[Python-checkins] peps: Added examples.

Eric V. Smith eric at trueblade.com
Thu May 24 22:17:04 CEST 2012


On 5/24/2012 4:13 PM, Nick Coghlan wrote:
> 
> On May 24, 2012 11:29 PM, "Eric V. Smith" <eric at trueblade.com
> <mailto:eric at trueblade.com>> wrote:
>>
>> Possibly I am being too tricky here by modifying parent.__path__, and I
>> should just modify sys.path again, as you suggest. But I was trying to
>> show that modifying parent.__path__ will also work.
> 
> Modifying namespace package __path__ attributes directly seems like a
> good way to accidentally break the auto-updating. We probably don't want
> to encourage that.

Well, it works if you modify it in place (so I added .extend() to
_NamespacePath). But I agree, it's not a great example. I'll modify it.



More information about the Python-checkins mailing list