On 03/29/2014 12:41 PM, Michael Torrie wrote:
On 03/29/2014 01:27 PM, Larry Hudson wrote:
On 03/28/2014 09:26 PM, Mark H Harris wrote:
PS Thunderbird puts *both* the list and the news group addys in the to:
header field on
reply-to-list. ~nice, huh.
Must be the way YOU set it up. MY Th
Chris Angelico writes:
> The problem isn't that I can't see what the comparisons are. It makes
> very good sense to bound a variable within constants; but you already
> know exactly where 2 is on the number line, so asking "Is 2 between
> these two variables" seems a bit odd. Maybe it's less so w
On 3/30/14 1:31 AM, Steven D'Aprano wrote:
I'm not sure what point you are trying to make. We have people here from
all over the earth, and enough illegal immigrants speaking Spanish to
account for a population about the size of Ohio.
*raises eyebrow*
Did you intend to imply that it is only il
Roy Smith wrote:
But, if you show me
a != None != b:
my brain just goes into overload.
Chained comparisons get weird with not-equal operators.
If you see
a == b == c
then it implies that a == c, but
a != b != c
does *not* imply that a != c. At least it doesn't in
Python; I've never s
On Sun, Mar 30, 2014 at 5:31 PM, Steven D'Aprano
wrote:
> Did you intend to imply that it is only illegal immigrants who speak
> Spanish in the USA?
I think he's correct there. After all, anyone who doesn't fit the
white-skinned monolingual (barely-one-language, really) middle-class
stereotype *M
On Sun, 30 Mar 2014 00:52:20 -0500, Mark H Harris wrote:
> On 3/29/14 10:45 AM, Mark Lawrence wrote:
>> On 29/03/2014 08:21, Mark H Harris wrote:
>>>
>>> Yes. Well, as the joke goes, if you're trilingual you speak three
>>> languages, if you're bilingual you speak two languages, if you're
>>>
On 3/29/14 12:53 PM, Steven D'Aprano wrote:
People have had localised code pages, and localised keyboards to enter
characters in those code pages, for up to 30 years, if not longer.
Nobody is arguing otherwise, Steven. Having a code page for a local
language is not the same thing as having
Chris Angelico wrote:
a 5x8 bitmap has
forty pixels, any of which can be either on or off - that gives
roughly twice as much data space as the 21-bit Unicode spec.
We don't need a font, then -- just map the pixels
straight onto bits in the character code!
Might require some user re-education,
On Sun, Mar 30, 2014 at 4:54 PM, Steven D'Aprano
wrote:
> On Sun, 30 Mar 2014 13:15:18 +1100, Chris Angelico wrote:
>
>> Chained comparisons where you're checking a single variable against two
>> constants make perfect sense:
>>
>> 2 < x < 5
>>
>> Chained comparisons where you check a single const
On Sat, 29 Mar 2014 19:54:09 -0700, Rustom Mody wrote:
> On Sunday, March 30, 2014 8:09:45 AM UTC+5:30, Roy Smith wrote:
>> I have no particular problem with
>
>> x < 2 < y
>
>> because it fits the same pattern. But, if you show me
>
>> a != None != b:
>
>> my brain just goes into overload.
On 3/29/14 6:59 AM, Marko Rauhamaa wrote:
I hate localization. You get a error message in Finnish from "make" or
"grep" and then you try to google it.
So mine is en_US, but I know people who do fi_FI.
... this is my point precisely.
--
https://mail.python.org/mailman/listinfo/python-list
On 3/29/14 10:45 AM, Mark Lawrence wrote:
On 29/03/2014 08:21, Mark H Harris wrote:
Yes. Well, as the joke goes, if you're trilingual you speak three
languages, if you're bilingual you speak two languages, if you're
monolingual you're an American (well, that might go for Australia too,
mayb
On Sun, 30 Mar 2014 13:15:18 +1100, Chris Angelico wrote:
> On Sun, Mar 30, 2014 at 1:04 PM, Steven D'Aprano
> wrote:
>> On Sat, 29 Mar 2014 17:07:20 -0400, Roy Smith wrote:
>>
>>> I certainly agree that things like
>>>
if a is not b is not None: ...
>>>
>>> belong in an obfuscated coding co
On March 29, 2014 9:43:00 PM CDT, Roy Smith wrote:
>In article <5337807b$0$29994$c3e8da3$54964...@news.astraweb.com>,
> Steven D'Aprano wrote:
>
>> a is b is c is None
>
>And we are all together. See how they run like pigs from a gun, see
>how
>they fly.
I'm cryin'.
(Really, that was terrib
On Sunday, March 30, 2014 8:09:45 AM UTC+5:30, Roy Smith wrote:
> I have no particular problem with
> x < 2 < y
> because it fits the same pattern. But, if you show me
> a != None != b:
> my brain just goes into overload. Honestly, I don't even know what that
> means. My brain keeps tryin
On Wed, Mar 26, 2014 at 7:43 AM, Ben Collier wrote:
> Hi all,
>
> I know that I can dynamically reference a variable with locals()["i"], for
> instance, but I'd like to know how to do this with a variable in an object.
>
> If I have an object called "device", with variables called attr1, attr2 ..
In article <5337807b$0$29994$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> a is b is c is None
And we are all together. See how they run like pigs from a gun, see how
they fly.
--
https://mail.python.org/mailman/listinfo/python-list
In article ,
Chris Angelico wrote:
> Chained comparisons where you're checking a single variable against
> two constants make perfect sense:
>
> 2 < x < 5
>
> Chained comparisons where you check a single constant against two
> variables don't, so much:
>
> x < 2 < y
To me, chained comparison
On Sat, 29 Mar 2014 17:36:55 -0500, Tim Chase wrote:
> And for cases where you have more than one or two things to test for
> None-itude, you could use
>
> if all(x is None for x in [a, b, c, d]):
> do_something_if_theyre_all_None()
>
> or
>
> if all(x is not None for x in [a, b, c, d])
On Sun, Mar 30, 2014 at 1:04 PM, Steven D'Aprano
wrote:
> On Sat, 29 Mar 2014 17:07:20 -0400, Roy Smith wrote:
>
>> I certainly agree that things like
>>
>>> if a is not b is not None: ...
>>
>> belong in an obfuscated coding contest.
>
> Apart from the fact that I got it wrong (that's what happen
On Sat, 29 Mar 2014 17:07:20 -0400, Roy Smith wrote:
> I certainly agree that things like
>
>> if a is not b is not None: ...
>
> belong in an obfuscated coding contest.
Apart from the fact that I got it wrong (that's what happens when I post
at 6am after being up all night, thanks for the co
On Sun, Mar 30, 2014 at 12:19 PM, Tim Chase
wrote:
> On 2014-03-30 10:17, Chris Angelico wrote:
>> On Sun, Mar 30, 2014 at 9:46 AM, Tim Chase
>> wrote:
>>> Though am I correct that your iteration tests for equality, while
>>> mine tests for identity? Also, my version bails early in the
>>> event
On 2014-03-30 10:17, Chris Angelico wrote:
> On Sun, Mar 30, 2014 at 9:46 AM, Tim Chase
> wrote:
>> Though am I correct that your iteration tests for equality, while
>> mine tests for identity? Also, my version bails early in the
>> event quitting early is possible. That's particularly useful in
On 03/29/2014 02:01 PM, Johannes Bauer wrote:
On 29.03.2014 20:05, Steven D'Aprano wrote:
On Sat, 29 Mar 2014 11:56:50 -0700, contact.trigon wrote:
if (a, b) != (None, None):
or
if a != None != b:
Preference? Pros? Cons? Alternatives?
if not (a is b is None): ...
Or if you prefer:
if a is
Thanks everyone; it has been very educational.
> Dave Angel:
> ...we'll find that two of the alternatives are not even equivalent.
That helped me realize (a,b) != (None, None) is not correct for the function.
It's a case where two parameters have None as the default argument. What I want
is to
On Sun, Mar 30, 2014 at 9:46 AM, Tim Chase wrote:
> Though am I correct that your iteration tests for equality, while
> mine tests for identity? Also, my version bails early in the event
> quitting early is possible. That's particularly useful in the case
> of doing something like
>
> if all(x
On 3/29/2014 2:56 PM, contact.tri...@gmail.com wrote:
if (a, b) != (None, None):
or
if a != None != b:
Preference? Pros? Cons? Alternatives?
if a is not None is not b
==
if a is not None and None is not b
==
if a is not None and b is not None
which is what I would write if not trying to be cut
In article ,
Tim Chase wrote:
> On 2014-03-29 18:41, Roy Smith wrote:
> > On Mar 29, 2014, at 6:36 PM, Tim Chase wrote:
> >
> > > And for cases where you have more than one or two things to test
> > > for None-itude, you could use
> > >
> > > if all(x is None for x in [a, b, c, d]):
> > >
On 2014-03-29 18:41, Roy Smith wrote:
> On Mar 29, 2014, at 6:36 PM, Tim Chase wrote:
>
> > And for cases where you have more than one or two things to test
> > for None-itude, you could use
> >
> > if all(x is None for x in [a, b, c, d]):
> >do_something_if_theyre_all_None()
>
> I might ha
On Mar 29, 2014, at 6:36 PM, Tim Chase wrote:
> And for cases where you have more than one or two things to test for
> None-itude, you could use
>
> if all(x is None for x in [a, b, c, d]):
>do_something_if_theyre_all_None()
I might have written that as:
if set([a, b, c, d]) == set(None)
On 2014-03-29 17:07, Roy Smith wrote:
> > if (a is not None) or (b is not None):
> >
> > is immediately understandable by everyone?
>
> I agree with that. But
>
> > if (a, b) != (None, None):
>
> seems pretty straight-forward to me too. In fact, if anything, it
> seems easier to understan
On 29.03.2014 22:55, Johannes Bauer wrote:
>>> if (a is not None) or (b is not None):
>
> Yes, probably. I liked the original, too. If I were writing the code,
> I'd probably try to aim to invert the condition though and simply do
>
> if (a is None) and (b is None)
>
> Which is pretty easy to u
On Sun, Mar 30, 2014 at 5:11 AM, Dennis Lee Bieber
wrote:
> Considering that a 5x8 bitmap font (which is unlikely to even have
> enough pixels to produce even 65536 unique glyphs) would take 5.6MB for
> your (17*65536), I wouldn't want to see what an algorithmic description
> would require
On 29.03.2014 22:07, Roy Smith wrote:
> I agree with that. But
>
>> if (a, b) != (None, None):
>
> seems pretty straight-forward to me too. In fact, if anything, it seems
> easier to understand than
>
>> if (a is not None) or (b is not None):
Yes, probably. I liked the original, too. If I w
Roy Smith Wrote in message:
> In article ,
> Johannes Bauer wrote:
>
>> On 29.03.2014 20:05, Steven D'Aprano wrote:
>> > On Sat, 29 Mar 2014 11:56:50 -0700, contact.trigon wrote:
>> >
>> >> if (a, b) != (None, None):
>> >> or
>> >> if a != None != b:
>> >>
>> >> Preference? Pros? Cons? Altern
Larry Hudson Wrote in message:
> On 03/28/2014 09:26 PM, Mark H Harris wrote:
>>
>> PS Thunderbird puts *both* the list and the news group addys in the to:
>> header field on
>> reply-to-list. ~nice, huh.
>
> Must be the way YOU set it up. MY Thunderbird (currently version 24.4.0 on
> Min
In article ,
Johannes Bauer wrote:
> On 29.03.2014 20:05, Steven D'Aprano wrote:
> > On Sat, 29 Mar 2014 11:56:50 -0700, contact.trigon wrote:
> >
> >> if (a, b) != (None, None):
> >> or
> >> if a != None != b:
> >>
> >> Preference? Pros? Cons? Alternatives?
> >
> > if not (a is b is None): ...
On 29.03.2014 20:05, Steven D'Aprano wrote:
> On Sat, 29 Mar 2014 11:56:50 -0700, contact.trigon wrote:
>
>> if (a, b) != (None, None):
>> or
>> if a != None != b:
>>
>> Preference? Pros? Cons? Alternatives?
>
> if not (a is b is None): ...
>
> Or if you prefer:
>
> if a is not b is not None: ..
On 03/29/2014 01:27 PM, Larry Hudson wrote:
> On 03/28/2014 09:26 PM, Mark H Harris wrote:
>>
>> PS Thunderbird puts *both* the list and the news group addys in the to:
>> header field on
>> reply-to-list. ~nice, huh.
>
> Must be the way YOU set it up. MY Thunderbird (currently version 24.4.
On 03/28/2014 09:26 PM, Mark H Harris wrote:
PS Thunderbird puts *both* the list and the news group addys in the to:
header field on
reply-to-list. ~nice, huh.
Must be the way YOU set it up. MY Thunderbird (currently version 24.4.0 on Mint Linux 16)
doesn't do any such thing. Besides,
> Do you actually want to check for arbitrary objects which may claim to
> equal None, or do you want to check for objects which are None?
Arbitrary objects are not a concern.
> if not (a is b is None): ...
>
> if a is not b is not None: ...
Thanks for the examples.
--
https://mail.python.o
Steven D'Aprano writes:
> if not (a is b is None): ...
>
> Or if you prefer:
>
> if a is not b is not None: ...
>>> 1 is not 1 is not None
False
So definitely the former!
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad ave
On Sat, 29 Mar 2014 11:56:50 -0700, contact.trigon wrote:
> if (a, b) != (None, None):
> or
> if a != None != b:
>
> Preference? Pros? Cons? Alternatives?
Do you actually want to check for arbitrary objects which may claim to
equal None, or do you want to check for objects which are None?
Nea
if (a, b) != (None, None):
or
if a != None != b:
Preference? Pros? Cons? Alternatives?
:D
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 28 Mar 2014 23:40:01 -0500, Mark H Harris wrote:
> On 3/28/14 10:51 PM, Steven D'Aprano wrote:
>> You are being patronising to the 94% of the world that is not from the
>> USA. Do you honestly think that people all over the world have been
>> using computers for 30 or 40 years without any
On Saturday 29 March 2014 13:12:06 Roy Smith did opine:
> In article <87txahi68z@elektro.pacujo.net>,
>
> Marko Rauhamaa wrote:
> > (But no, I wouldn't name my variables in Hebrew because the next
> > maintainer might not have a keyboard like mine.)
>
> Have you ever done any work in PHP?
On Saturday 29 March 2014 13:47:13 Marko Rauhamaa did opine:
> Roy Smith :
> > Have you ever done any work in PHP? Many of the error messages are
> > Hebrew, transliterated into English. I've gotten many a
> > T_PAAMAYIM_NEKUDOTAYIM error.
>
> I hate localization. You get a error message in Finni
On Sat, 29 Mar 2014 00:40:43 -0500, Mark H Harris wrote:
> On 3/29/14 12:13 AM, Chris Angelico wrote:
>>
>> When I first met Windows keys, I just popped 'em off and left a gap.
>> Worked fine.
>
> ha! see.. it popped you off too! :-)) I found it arrogant to the
> max to place their stupid lo
On 28/03/2014 22:12, Mark Lawrence wrote:
As for the stupid symbol that you're using, real programmers don't give
a damn about such things, they prefer writing plain, simple, boring code
that is easy to read
What he said.
--
https://mail.python.org/mailman/listinfo/python-list
On 29/03/2014 03:21, Rustom Mody wrote:
On Saturday, March 29, 2014 8:34:19 AM UTC+5:30, Mark H. Harris wrote:
On 3/28/14 9:33 PM, Steven D'Aprano wrote:
Mark, please stop posting to the newsgroup comp.lang.python AND the
mailing list (...). They mirror each other. Your posts
are not so importa
On 29/03/2014 08:21, Mark H Harris wrote:
Yes. Well, as the joke goes, if you're trilingual you speak three
languages, if you're bilingual you speak two languages, if you're
monolingual you're an American (well, that might go for Australia too,
maybe). When whole continents speak the same la
Roy Smith :
> Have you ever done any work in PHP? Many of the error messages are
> Hebrew, transliterated into English. I've gotten many a
> T_PAAMAYIM_NEKUDOTAYIM error.
I hate localization. You get a error message in Finnish from "make" or
"grep" and then you try to google it.
So mine is en_US
In article <87txahi68z@elektro.pacujo.net>,
Marko Rauhamaa wrote:
> (But no, I wouldn't name my variables in Hebrew because the next
> maintainer might not have a keyboard like mine.)
Have you ever done any work in PHP? Many of the error messages are
Hebrew, transliterated into English.
Steven D'Aprano :
> Under what circumstances do you see yourself needing a keyboard capable
> of typing Hindi?
>
> I don't wish to pay for a keyboard for entering Arabic
Everybody should be able to have a keyboard for their needs. If I should
need an APL keyboard, I would have it in a jiffy.
At
On Fri, Mar 28, 2014 at 11:40 PM, Mark H Harris wrote:
> On 3/29/14 12:13 AM, Chris Angelico wrote:
>>
>> When I first met Windows keys, I just popped 'em off and left a gap.
>> Worked fine.
>
> ha! see.. it popped you off too! :-)) I found it arrogant to the max to
> place their stupid logo
On 3/29/14 1:03 AM, Chris Angelico wrote:
http://forum.ecomstation.ru/
Prominent discussion forum, although that strives to be at least
partially bilingual in deference to those of us who are so backward as
to speak only English.
Yes. Well, as the joke goes, if you're trilingual you speak
Dear Pythoneers,
Just letting you know we got a Kickstarter going on for Embroidermodder2
finally.
We are going to need all the support we can get.
https://www.kickstarter.com/projects/redteam316/embroidermodder-2-for-windows-mac-linux-pi-and-ard
What is the program for you may ask...?
It is for
57 matches
Mail list logo