On Tue, 8 Nov 2005 19:28:36 -0800, Alex Martelli <[EMAIL PROTECTED]> wrote:
>Aahz <[EMAIL PROTECTED]> wrote:
> ...
>> >For pickling, object() as a unique "nothing here, NOT EVEN a None"
>> >marker (AKA sentinel) works fine.
>>
>> How does that work? Maybe I'm missing something obvious.
>>
>>
Aahz <[EMAIL PROTECTED]> wrote:
...
> >For pickling, object() as a unique "nothing here, NOT EVEN a None"
> >marker (AKA sentinel) works fine.
>
> How does that work? Maybe I'm missing something obvious.
>
> sentinel = object()
> class C:
> def __init__(self, foo=sentinel):
>
In article <[EMAIL PROTECTED]>,
Alex Martelli <[EMAIL PROTECTED]> wrote:
>Aahz <[EMAIL PROTECTED]> wrote:
>>Alex:
>>>Aahz:
Alex:
>
>the canonical idiom when you need such distinction is:
>
>_not_there = object()
What's your preferred idiom when you're dealing with stor
Aahz <[EMAIL PROTECTED]> wrote:
...
> >>>the canonical idiom when you need such distinction is:
> >>>
> >>>_not_there = object()
...
> >> What's your preferred idiom when you're dealing with storable objects?
> >
> >What's a "storable object"? You mean, something that can be pickled, or
> >p
In article <[EMAIL PROTECTED]>,
Alex Martelli <[EMAIL PROTECTED]> wrote:
>Aahz <[EMAIL PROTECTED]> wrote:
>> In article <[EMAIL PROTECTED]>,
>> Alex Martelli <[EMAIL PROTECTED]> wrote:
>>>
>>>the canonical idiom when you need such distinction is:
>>>
>>>_not_there = object()
>>>def foo(bar=_not_the
Aahz <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Alex Martelli <[EMAIL PROTECTED]> wrote:
> >
> >the canonical idiom when you need such distinction is:
> >
> >_not_there = object()
> >def foo(bar=_not_there, baz=_not_there, bap=_not_there):
> >if bar is _not_there: ...
> >
>
In article <[EMAIL PROTECTED]>,
Alex Martelli <[EMAIL PROTECTED]> wrote:
>
>the canonical idiom when you need such distinction is:
>
>_not_there = object()
>def foo(bar=_not_there, baz=_not_there, bap=_not_there):
>if bar is _not_there: ...
>
>Other unique objects can be substituted for the 'se