[EMAIL PROTECTED] (John J. Lee) writes:
[...]
> Yes, that's true, I didn't really take in this particular example,
> just the use of "is ". That's not the way it was used
> in docutils, though (do I mean docutils?).
No, I meant epydoc (I think...)
John
--
http://mail.python.org/mailman/listin
On 2006-10-10, Ben Finney <[EMAIL PROTECTED]> wrote:
> "Andy Salnikov" <[EMAIL PROTECTED]> writes:
>
>> "Aahz" <[EMAIL PROTECTED]> wrote:
>> > Antoon Pardon <[EMAIL PROTECTED]> wrote:
>> >>The problem is there is also ground for bugs if you don't use
>> >>"blah is True". If some application natural
On 2006-10-09, Aahz <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Antoon Pardon <[EMAIL PROTECTED]> wrote:
>>On 2006-10-08, Aahz <[EMAIL PROTECTED]> wrote:
>>> In article <[EMAIL PROTECTED]>, John J. Lee <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] (Aahz) writes:
>
> T
"Andy Salnikov" <[EMAIL PROTECTED]> writes:
> "Aahz" <[EMAIL PROTECTED]> wrote:
> > Antoon Pardon <[EMAIL PROTECTED]> wrote:
> >>The problem is there is also ground for bugs if you don't use
> >>"blah is True". If some application naturally seems to ask for a
> >>variable that can be valued False,
"Aahz" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> In article <[EMAIL PROTECTED]>, Antoon Pardon
> <[EMAIL PROTECTED]> wrote:
>>
>>The problem is there is also ground for bugs if you don't use "blah is
>>True". If some application naturally seems to ask for a variable that
>>ca
[EMAIL PROTECTED] (Aahz) writes:
[...]
> >I think I was reading the same code recently (epydoc?) and was also
> >momentarily horrified ;-) until I realized that it was quite
> >deliberately using three-valued logic (True, False, None) for some
> >presumably-sensible reason. Since None is false, th
Ben Finney <[EMAIL PROTECTED]> writes:
> [EMAIL PROTECTED] (John J. Lee) writes:
>
> > [EMAIL PROTECTED] (Aahz) writes:
> > > if schema.elements.has_key(key) is False:
> >
> > I think I was reading the same code recently (epydoc?) and was also
> > momentarily horrified ;-) until I realized th
In article <[EMAIL PROTECTED]>,
Antoon Pardon <[EMAIL PROTECTED]> wrote:
>On 2006-10-08, Aahz <[EMAIL PROTECTED]> wrote:
>> In article <[EMAIL PROTECTED]>, John J. Lee <[EMAIL PROTECTED]> wrote:
>>>[EMAIL PROTECTED] (Aahz) writes:
The following line of lightly munged code was found in a
On 2006-10-08, Aahz <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>, John J. Lee <[EMAIL PROTECTED]> wrote:
>>[EMAIL PROTECTED] (Aahz) writes:
>>>
>>> The following line of lightly munged code was found in a publicly
>>> available Python library...
>>>
>>> if schema.elements.has_ke
Antoon Pardon wrote:
> On 2006-10-07, John Machin <[EMAIL PROTECTED]> wrote:
>
>>Steven D'Aprano wrote:
>>
>>>On Fri, 06 Oct 2006 18:29:34 -0700, John Machin wrote:
>>>
>>>
MonkeeSage wrote:
>On Oct 6, 8:02 pm, "MonkeeSage" <[EMAIL PROTECTED]> wrote:
>
>>it is clearer to you t
On 2006-10-07, John Machin <[EMAIL PROTECTED]> wrote:
>
> Steven D'Aprano wrote:
>> On Fri, 06 Oct 2006 18:29:34 -0700, John Machin wrote:
>>
>> >
>> > MonkeeSage wrote:
>> >> On Oct 6, 8:02 pm, "MonkeeSage" <[EMAIL PROTECTED]> wrote:
>> >> > it is clearer to you to make the condition explicit ("bl
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote:
> On Fri, 06 Oct 2006 18:29:34 -0700, John Machin wrote:
> > MonkeeSage wrote:
> >> On Oct 6, 8:02 pm, "MonkeeSage" <[EMAIL PROTECTED]> wrote:
> >> > it is clearer to you to make the condition explicit ("blah not False"),
> >>
> >> "blah not False" -> "
Google has a cool new service.
http://www.google.com/codesearch
You can use regular expressions!
(I found at least 13 distinct utilities that used the idiom.)
Nils
--
http://mail.python.org/mailman/listinfo/python-list
Lawrence D'Oliveiro wrote:
> In message <[EMAIL PROTECTED]>, John
> Machin wrote:
>
> >
> > Steven D'Aprano wrote:
> >> On Fri, 06 Oct 2006 18:29:34 -0700, John Machin wrote:
> >>
> >> >
> >> > MonkeeSage wrote:
> >> >> On Oct 6, 8:02 pm, "MonkeeSage" <[EMAIL PROTECTED]> wrote:
> >> >> > it is cle
Lawrence D'Oliveiro wrote:
> In message <[EMAIL PROTECTED]>, John
> Machin wrote:
>
> >
> > Steven D'Aprano wrote:
> >> On Fri, 06 Oct 2006 18:29:34 -0700, John Machin wrote:
> >>
> >> >
> >> > MonkeeSage wrote:
> >> >> On Oct 6, 8:02 pm, "MonkeeSage" <[EMAIL PROTECTED]> wrote:
> >> >> > it is cle
In message <[EMAIL PROTECTED]>, John
Machin wrote:
>
> Steven D'Aprano wrote:
>> On Fri, 06 Oct 2006 18:29:34 -0700, John Machin wrote:
>>
>> >
>> > MonkeeSage wrote:
>> >> On Oct 6, 8:02 pm, "MonkeeSage" <[EMAIL PROTECTED]> wrote:
>> >> > it is clearer to you to make the condition explicit ("bla
In article <[EMAIL PROTECTED]>, John J. Lee <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] (Aahz) writes:
>>
>> The following line of lightly munged code was found in a publicly
>> available Python library...
>>
>> if schema.elements.has_key(key) is False:
>>
>> Sorry, just had to vent.
>
>I t
[EMAIL PROTECTED] (John J. Lee) writes:
> [EMAIL PROTECTED] (Aahz) writes:
> > if schema.elements.has_key(key) is False:
>
> I think I was reading the same code recently (epydoc?) and was also
> momentarily horrified ;-) until I realized that it was quite
> deliberately using three-valued logi
[EMAIL PROTECTED] (Aahz) writes:
> The following line of lightly munged code was found in a publicly
> available Python library...
>
> if schema.elements.has_key(key) is False:
>
> Sorry, just had to vent.
I think I was reading the same code recently (epydoc?) and was also
momentarily horri
John Machin wrote:
> ... any function/method whose name begins with "has" or "is"
> returns an honest-to-goodness actual bool (or what passed for
> one in former times).
True for 75% of the builtins:
>>> import __builtin__
>>> sorted(nm for nm in dir(__builtin__)
if nm.sta
In article <[EMAIL PROTECTED]>,
John Machin <[EMAIL PROTECTED]> wrote:
>Aahz wrote:
>> In article <[EMAIL PROTECTED]>,
>> MonkeeSage <[EMAIL PROTECTED]> wrote:
>>>On Oct 6, 6:27 pm, [EMAIL PROTECTED] (Aahz) wrote:
The following line of lightly munged code was found in a publicly
avai
John Roth wrote:
> Aahz wrote:
> > The following line of lightly munged code was found in a publicly
> > available Python library...
> >
> > if schema.elements.has_key(key) is False:
> >
> > Sorry, just had to vent.
> > --
> > Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncra
Aahz wrote:
> The following line of lightly munged code was found in a publicly
> available Python library...
>
> if schema.elements.has_key(key) is False:
>
> Sorry, just had to vent.
> --
> Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/
Uh, guys. IMO, the cleares
Steven D'Aprano wrote:
> On Fri, 06 Oct 2006 18:29:34 -0700, John Machin wrote:
>
> >
> > MonkeeSage wrote:
> >> On Oct 6, 8:02 pm, "MonkeeSage" <[EMAIL PROTECTED]> wrote:
> >> > it is clearer to you to make the condition explicit ("blah not False"),
> >>
> >> "blah not False" -> "blah is False"
>
On Fri, 06 Oct 2006 18:29:34 -0700, John Machin wrote:
>
> MonkeeSage wrote:
>> On Oct 6, 8:02 pm, "MonkeeSage" <[EMAIL PROTECTED]> wrote:
>> > it is clearer to you to make the condition explicit ("blah not False"),
>>
>> "blah not False" -> "blah is False"
>
> Whichever way your team wants to i
On 2006-10-07, MonkeeSage <[EMAIL PROTECTED]> wrote:
>
> On Oct 6, 8:34 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>> And in the original case, I'd agree that "if X.has_key():" is
>> quite clear, already yielding a boolian value, and so doesn't
>> need to be tested for if it's False. But I wouldn'
Aahz wrote:
> In article <[EMAIL PROTECTED]>,
> MonkeeSage <[EMAIL PROTECTED]> wrote:
> >On Oct 6, 6:27 pm, [EMAIL PROTECTED] (Aahz) wrote:
> >>
> >> The following line of lightly munged code was found in a publicly
> >> available Python library...
> >
> >Yes, this violates the Holy, Inspired, Inf
In article <[EMAIL PROTECTED]>,
MonkeeSage <[EMAIL PROTECTED]> wrote:
>On Oct 6, 6:27 pm, [EMAIL PROTECTED] (Aahz) wrote:
>>
>> The following line of lightly munged code was found in a publicly
>> available Python library...
>
>Yes, this violates the Holy, Inspired, Infallible Style Guide (pbuh),
>
MonkeeSage wrote:
> On Oct 6, 6:27 pm, [EMAIL PROTECTED] (Aahz) wrote:
> > The following line of lightly munged code was found in a publicly
> > available Python library...
>
> Yes, this violates the Holy, Inspired, Infallible Style Guide (pbuh),
> which was written by the very finger of God when
On Oct 6, 8:34 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> And in the original case, I'd agree that "if X.has_key():" is
> quite clear, already yielding a boolian value, and so doesn't
> need to be tested for if it's False. But I wouldn't like to test
> for an empty list or for None implicitly.
On 6 Oct 2006 16:27:51 -0700, Aahz <[EMAIL PROTECTED]> wrote:
> The following line of lightly munged code was found in a publicly
> available Python library...
>
> if schema.elements.has_key(key) is False:
if not schema.elements.has_key(key): or, actually, if not key in
schema.elements: is how
At Friday 6/10/2006 22:02, MonkeeSage wrote:
> The following line of lightly munged code was found in a publicly
> available Python library...
Yes, this violates the Holy, Inspired, Infallible Style Guide (pbuh),
which was written by the very finger of God when the world was still in
It's not
On 2006-10-07, John Machin <[EMAIL PROTECTED]> wrote:
>
> MonkeeSage wrote:
>> On Oct 6, 8:02 pm, "MonkeeSage" <[EMAIL PROTECTED]> wrote:
>> > it is clearer to you to make the condition explicit ("blah not False"),
>>
>> "blah not False" -> "blah is False"
>
> Whichever way your team wants to inter
MonkeeSage wrote:
> On Oct 6, 8:02 pm, "MonkeeSage" <[EMAIL PROTECTED]> wrote:
> > it is clearer to you to make the condition explicit ("blah not False"),
>
> "blah not False" -> "blah is False"
Whichever way your team wants to interpret it, d00d.
Please consider whether you should be writing "(
On 2006-10-07, MonkeeSage <[EMAIL PROTECTED]> wrote:
>
>
> On Oct 6, 6:27 pm, [EMAIL PROTECTED] (Aahz) wrote:
>> The following line of lightly munged code was found in a
>> publicly available Python library...
>
> Yes, this violates the Holy, Inspired, Infallible Style Guide
> (pbuh), which was wri
On Oct 6, 8:02 pm, "MonkeeSage" <[EMAIL PROTECTED]> wrote:
> it is clearer to you to make the condition explicit ("blah not False"),
"blah not False" -> "blah is False"
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 6, 6:27 pm, [EMAIL PROTECTED] (Aahz) wrote:
> The following line of lightly munged code was found in a publicly
> available Python library...
Yes, this violates the Holy, Inspired, Infallible Style Guide (pbuh),
which was written by the very finger of God when the world was still in
chaot
The following line of lightly munged code was found in a publicly
available Python library...
if schema.elements.has_key(key) is False:
Sorry, just had to vent.
--
Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/
"If you don't know what your program is supposed to
38 matches
Mail list logo