Complaint Dept: My shoes!

Moshe Zadka moshez at math.huji.ac.il
Sat Apr 15 01:26:57 EDT 2000


On 14 Apr 2000, Martijn Faassen wrote:

> And now I'm going to tell you how to make len(None) return 0. This
> is an implementation detail. It's a *bug* that ought to be fixed.
> 
> Put this in the module where you want len(None) to be 0:
> 
> None = ""

Even better, anywhere in the application put

import __builtin__
__builtin.None = ""
del __builtin__

making-python-scarier-for-everybody-ly y'rs, Z.

--
Moshe Zadka <mzadka at geocities.com>. 
http://www.oreilly.com/news/prescod_0300.html
http://www.linux.org.il -- we put the penguin in .com





More information about the Python-list mailing list