Re: a heisenbug

2017-08-28 Thread Peter Otten
Steve D'Aprano wrote: > On Tue, 29 Aug 2017 07:09 am, Peter Otten wrote: > >> The lesson is that if you use a (sub)module you should never rely on an >> implicit import. > > ... unless the module is documented as automatically importing the > submodule. An example is os.path. os.path is the onl

Re: a heisenbug

2017-08-28 Thread Steve D'Aprano
On Tue, 29 Aug 2017 07:09 am, Peter Otten wrote: > The lesson is that if you use a (sub)module you should never rely on an > implicit import. ... unless the module is documented as automatically importing the submodule. An example is os.path. -- Steve “Cheer up,” they said, “things could be wo

Re: a heisenbug

2017-08-28 Thread Chris Angelico
ur program because it makes the bug go away. :-) That's not a heisenbug, then. It's cargo cult programming. :-) ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: a heisenbug

2017-08-28 Thread Gregory Ewing
Chris Angelico wrote: It's a bit surprising but only an issue with interactive work. (You won't use help() elsewhere.) Unless you decide to put help(collections) at the top of your program because it makes the bug go away. :-) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: a heisenbug

2017-08-28 Thread Peter Otten
Chris Angelico wrote: > On Tue, Aug 29, 2017 at 4:59 AM, Stefan Ram > wrote: >> This might be what one calls "heisenbug": >> >> No attribute 'abc' is visible. One tries to >> study it with "help". And next time it's there. >> "help" /did/ help! >> >> Python 3.6.0 ... >> > import colle

Re: a heisenbug

2017-08-28 Thread Chris Angelico
On Tue, Aug 29, 2017 at 4:59 AM, Stefan Ram wrote: > This might be what one calls "heisenbug": > > No attribute 'abc' is visible. One tries to > study it with "help". And next time it's there. > "help" /did/ help! > > Python 3.6.0 ... > import collections > isinstance( 'abc', col