[issue19499] "import this" is cached in sys.modules

2013-11-10 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: -gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue19499] "import this" is cached in sys.modules

2013-11-10 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I completely agree with Tim. The 'this' module was a *joke* and a stealthy one at that. http://www.wefearchange.org/2010/06/import-this-and-zen-of-python.html About the only thing I'd support is adding some comments to the code to either explain what's goin

[issue19499] "import this" is cached in sys.modules

2013-11-10 Thread Tim Peters
Tim Peters added the comment: Reassigned to Barry, since he wrote this module ;-) FWIW, I wouldn't change it. It wasn't intended to be educational, but a newbie could learn quite a bit by figuring out how it works. -- assignee: tim.peters -> barry nosy: +barry __

[issue19499] "import this" is cached in sys.modules

2013-11-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: > Having "import this" behave differently from any other import is > counter-intuitive I agree. My proposal (by design) does not change the property of executing only when first imported. I merely proposed that the text either start as cleartext or that the d

[issue19499] "import this" is cached in sys.modules

2013-11-09 Thread Ezio Melotti
Ezio Melotti added the comment: I think this should be closed as won't fix. Having "import this" behave differently from any other import is counter-intuitive (students will start asking "why if I reimport 'this' the code gets executed every time but it doesn't work with my module?"). If they

[issue19499] "import this" is cached in sys.modules

2013-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Terry is right here. The "this" module doesn't seem to have been thought as an educational tool in the first place. -- nosy: +pitrou ___ Python tracker ___

[issue19499] "import this" is cached in sys.modules

2013-11-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: The current ugly, implicit, complex ROT13? + custom decoder version of this.py violates the initial tenets that it prints. I suppose that is an intentional joke. If it were explicit and simple: text = ''' ...''' print(text) then people could follow up impo

[issue19499] "import this" is cached in sys.modules

2013-11-05 Thread Georg Brandl
Georg Brandl added the comment: IMO the fact that importing happens only once is also a very important one, so much the better this helps in learning it early. The bad thing is that opening this.py to see what's happening will not really enlighten the beginner :) -- _

[issue19499] "import this" is cached in sys.modules

2013-11-05 Thread Eric Snow
Eric Snow added the comment: +0 to just doing a reload. At the point you show someone "import this", it may be premature to be explaining reloading to them. Python is great because you usually don't have to hand-wave through some concepts in order to explain others. [1] Also, under Python 3

[issue19499] "import this" is cached in sys.modules

2013-11-05 Thread Mark Lawrence
Mark Lawrence added the comment: If it ain't broke don't fix it. -- nosy: +BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mai

[issue19499] "import this" is cached in sys.modules

2013-11-05 Thread R. David Murray
R. David Murray added the comment: It seems to me that having import this work more than once would teach a beginner the *wrong* lesson about how python import works. So I agree that it should be a teaching moment, not a bug to be fixed. -- nosy: +r.david.murray _

[issue19499] "import this" is cached in sys.modules

2013-11-05 Thread Georg Brandl
Georg Brandl added the comment: Whatever we decide to do here, it **must** also be done for antigravity.py. -- nosy: +georg.brandl ___ Python tracker ___

[issue19499] "import this" is cached in sys.modules

2013-11-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue19499] "import this" is cached in sys.modules

2013-11-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'd take their question as an educational opportunity. reload(this) -- nosy: +gregory.p.smith ___ Python tracker ___

[issue19499] "import this" is cached in sys.modules

2013-11-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, a question about "this" has come up on multiple occasions when I teach Python classes. -- assignee: -> tim.peters ___ Python tracker

[issue19499] "import this" is cached in sys.modules

2013-11-04 Thread Eric Snow
Eric Snow added the comment: You could add the following to the bottom of this.py: import sys del sys.modules['this'] -- nosy: +eric.snow ___ Python tracker ___

[issue19499] "import this" is cached in sys.modules

2013-11-04 Thread Tim Peters
Tim Peters added the comment: "Special cases aren't special enough to break the rules." ;-) -- nosy: +tim.peters ___ Python tracker ___ __

[issue19499] "import this" is cached in sys.modules

2013-11-04 Thread Raymond Hettinger
New submission from Raymond Hettinger: The "this" module doesn't import functions; instead, it prints directly to stdout. Accordingly, there is no reason to cache this module in sys.modules. Ideally, a learner should be able to type "import this" more than once in a Python session.