This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients barry, eric.smith, ezio.melotti, mrabarnett, rhettinger, serhiy.storchaka
Date 2015-06-15.14:47:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1434379663.24.0.575404624547.issue24454@psf.upfronthosting.co.za>
In-reply-to
Content
The disadvantage of supporting len() is its ambiguousness. Supporting indexing with group name also has disadvantages (benefits already was mentioned above).

1. Indexing with string keys is a part of mapping protocol, and it would be expected that other parts of the protocol if not all are supported (at least len() and iteration), but they are not.

2. If indexing with group names would be supported, it would be expected the support of integer indexes. But this is ambiguous too.

This feature would improve the access to named groups (6 characters less to type for every case and better readability), but may be implementing access via attributes would be even better? mo.groupnamespace().col or mo.ns.col?
History
Date User Action Args
2015-06-15 14:47:43serhiy.storchakasetrecipients: + serhiy.storchaka, barry, rhettinger, eric.smith, ezio.melotti, mrabarnett
2015-06-15 14:47:43serhiy.storchakasetmessageid: <1434379663.24.0.575404624547.issue24454@psf.upfronthosting.co.za>
2015-06-15 14:47:43serhiy.storchakalinkissue24454 messages
2015-06-15 14:47:43serhiy.storchakacreate