[Python-ideas] PEP 335: Another use case

Gerald Britton gerald.britton at gmail.com
Wed Oct 5 15:13:20 CEST 2011


>I've received the following comments concerning another>potential use case for PEP 335.>>-------- Original Message -------->Subject: 	PEP 335 and NumPy NA>Date: 	Tue, 4 Oct 2011 15:42:50 -0700>From: 	Mark Wiebe <mwwiebe at gmail.com>>To: 	Gregory Ewing <greg at cosc.canterbury.ac.nz>>>Hi Greg,>>I took a glance at the python-ideas list, and saw that you're proposing>an update to PEP 335. I recently did a short internship at Enthought>where they asked me to look into the "missing data" problem for NumPy,>and I believe the work from that provides further motivation for the>PEP. Basically, the approach to allow good handling of missing data is>emulating the R programming language by introducing a new value called>NA, similar to the built-in None. For an NA with a boolean type, you get>a three-valued logic, as described>in http://en.wikipedia.org/wiki/Three-valued_logic#Kleene_logic. In the>NA I added to NumPy, this truth table cannot be satisfied because of the>issue PEP 335 addresses:

Interesting!  Kinda like SQL, I think, which has True, False and Null
(similar to NA in R).
Weird to think SQL "solved" this problem 40 years ago!


-- 
Gerald Britton



More information about the Python-ideas mailing list