On Sun, Mar 6, 2011 at 2:54 PM, Ron Adam <r...@ronadam.com> wrote:
>
>    ... if the key matches sys.modules.__missing__
>
> Works for me. ;-)
>
> We can find a better name than __missing__ later.  (minor detail)

__missing__ is a dict method. I was merely noting it would make more
sense to override that rather than __setitem__ to avoid slowing down
normal lookups in sys.modules.

However, I'll still advocate the simple approach (two entries) for
now. Assuming uniqueness of values in a dictionary is invalid in
general, so code assuming it for sys.modules is arguably already
incorrect. Definitely a point deserving of more discussion in the PEP,
though.

Cheers,
Nick.


-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to