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 decrypted text be saved as a module attribute. *This* would make 
'this' *more* like normal modules.

Having side-effect code executed on import, as opposed to when running as main, 
is unusual. (Idlelib.idle is another intentional example, and one which 
currently has the same problem.) But I agree that this unusual behavior should 
remain for both.

Having module code that is intentionally obfuscated and as about as inefficient 
as possible without being totally ridiculous is, I hope, unique, and not at all 
like other modules.

Even if Tim wants to keep the literal encrypted, and the rot13 codec is not 
available in Py3 (?), the decoding would, I believe, be much more efficient 
using str.translate. Or the text could be encoded and decoded with one of the 
pairs in the binascii or base64 modules.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19499>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to