On Tue, Apr 25, 2006, Kevin Jacobs <[EMAIL PROTECTED]> wrote:
>
> Actually this sounds a lot like a signaling Not-a-number (sNaN)
> from IEEE754.  One can pass around a sNaN, but any use will raise a
> (numeric) exception.  Similarly, you want a signaling Not-an-Object
> (sNaO) that also doesn't like to be passed as a function argument.  It
> is the last bit that makes it a pain, since what if your function is
> log_error_value(sNaO)?

Note that Python does make it fairly straightforward to define such
objects on a per-domain basis.  E.g.:

    sentinel = object()

The biggest problem from my POV with widespread adoption of this
technique is that it doesn't play well with pickle.  Perhaps someone
wants to take a whack at defining a more generic mechanism for sentinels?
-- 
Aahz ([EMAIL PROTECTED])           <*>         http://www.pythoncraft.com/

"Argue for your limitations, and sure enough they're yours."  --Richard Bach
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to