Easter Eggs

Tim Peters tim.one at comcast.net
Thu Apr 11 00:08:02 EDT 2002


[Roy Smith]
> Actually, backward compatibility can be harder to achieve than
> you seem to think.  By adding the "this" module, you broke existing
> code which relied on:
>
> try:
>    import this
> except ImportError:
>    do stuff
>
> doing stuff.  Stick that in your PEP and smoke it :-)

It's actually worse than that:  if some poor suck^H^H^H^Huser had a this.py
in one of their own directories, and we suddenly put one under Lib/ before
their directory on the Python search path, they'd pick up a wrong module by
mistake.  I tried to keep this.py out of the maintenance releases for that
reason; indeed, at first this.py was scrupulously kept out of CVS
altogether, and inserted into the pre-conference pre-release tarball and
installers by hand.  Nobody even noticed, let alone complained, so tolerance
for me bitching about this.py vanished.  In fairness, I became an
enthusiastic fan after I realized exactly who it would and would not piss
off <wink>.






More information about the Python-list mailing list