[Python-Dev] sys.implementation

Barry Warsaw barry at python.org
Sat May 12 16:35:23 CEST 2012


On May 12, 2012, at 10:04 PM, Nick Coghlan wrote:

>On Sat, May 12, 2012 at 12:40 PM, Eric Snow <ericsnowcurrently at gmail.com>
>wrote: > If anyone has strong feelings for item-access over attribute-access,
>> please elaborate.  I'm just not seeing it as that important and would >
>rather finish up the PEP as simply as possible.
>
>I object to adding a new type to the stdlib just for this PEP. Since
>iterating over the keys is significantly more useful than iterating over the
>values, that suggests a dictionary as the most appropriate type.

I'm okay with dropping immutability for sys.implementation, but I still think
attribute access is a more useful model.  You can easily support both getattr
and getitem with a class instance, so I think that's the way to go.

(FWIW, immutability would also be easy to support with an instance.)

-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120512/b8ab6c32/attachment.pgp>


More information about the Python-Dev mailing list