On Thu, 4 Dec 2008 06:40:02 +0200 "Hendrik van Rooyen"
<[EMAIL PROTECTED]> wrote:
> "Andreas Waldenburger" <[EMAIL PROTECTED]>
>
> > On 04 Dec 2008 15:53:21 GMT Steven D'Aprano
> > <[EMAIL PROTECTED]> wrote:
> >
> > > Hendrik, I think your PC's clock is wrong. You seem to be posting
> > > from t
Steven D'Aprano wrote:
Hendrik, I think your PC's clock is wrong. You seem to be posting from
the future.
further evidence of the Guido's time-machine[1]. For the secret
cabal of core developers who borrow the time-machine, I recommend
not sending email from within it. :)
-tkc
[1]
http:
"Andreas Waldenburger" <[EMAIL PROTECTED]>
> On 04 Dec 2008 15:53:21 GMT Steven D'Aprano
> <[EMAIL PROTECTED]> wrote:
>
> > Hendrik, I think your PC's clock is wrong. You seem to be posting
> > from the future.
>
> So? Maybe he is. What's your problem?
It was probably playing hob with his thre
"Steven D'Aprano" wrote:
>Hendrik, I think your PC's clock is wrong. You seem to be posting from
>the future.
I always knew I was more advanced than other people...
:-)
Well spotted!
Thanks
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
On 04 Dec 2008 15:53:21 GMT Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> Hendrik, I think your PC's clock is wrong. You seem to be posting
> from the future.
So? Maybe he is. What's your problem?
/W
--
My real email address is constructed by swapping the domain with the
recipient (local part)
Hendrik, I think your PC's clock is wrong. You seem to be posting from
the future.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Dec 4, 2008 at 1:19 PM, Hendrik van Rooyen <[EMAIL PROTECTED]>wrote:
>
> "Cameron Laird" <[EMAIL PROTECTED]> wrote:
>
> > There's a realm within Pythonia that favors lambdalessness.
>
> And who, may I ask, Is the King of this realm?
>
> - Hendrik
>
> --
> http://mail.python.org/mailman/li
"Cameron Laird" <[EMAIL PROTECTED]> wrote:
> There's a realm within Pythonia that favors lambdalessness.
And who, may I ask, Is the King of this realm?
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 4, 1:52 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED]
central.gen.new_zealand> wrote:
> Why is that? Was Rossum frightened in his cradle by a lambda when he was a
> baby? Are some people afraid of lambdas the way others are afraid of
> spiders?
"Language designers are a superstitious and cowar
In message <[EMAIL PROTECTED]>, Cameron Laird wrote:
> There's a realm within Pythonia that favors lambdalessness.
Why is that? Was Rossum frightened in his cradle by a lambda when he was a
baby? Are some people afraid of lambdas the way others are afraid of
spiders?
--
http://mail.python.org/mai
In article <[EMAIL PROTECTED]>,
Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
>In message <[EMAIL PROTECTED]>, Cameron Laird wrote:
>
>>def shell_escape(Arg) :
>>"""returns Arg suitably escaped for use as a command-line argument
>>to Bash."""
>>
>>pattern = r"[\<\>\"\
Hi,
what about numpy?
import numpy
a = numpy.ones((10,),dtype=numpy.bool)
I = [1,3,8]
a[I]=False
print a
gives: [ True False True False True True True True False True]
Almar
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Dec 3, 2008 at 6:23 AM, Lawrence D'Oliveiro
<[EMAIL PROTECTED]> wrote:
>
> So why is that better?
> --
> http://mail.python.org/mailman/listinfo/python-list
>
I personally think that it looks marginally cleaner (indentation issues
aside).
Do you think it's substantially worse? If so, why
In message <[EMAIL PROTECTED]>, Cameron Laird wrote:
>def shell_escape(Arg) :
>"""returns Arg suitably escaped for use as a command-line argument
>to Bash."""
>
>pattern = r"[\<\>\"\'\|\&\$\#\;\(\)\[\]\{\}\`\!\~\ \\]"
>def f1(Match):
> return "\\" + Match.group
In article <[EMAIL PROTECTED]>,
Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
>Cameron Laird wrote:
>
>>def f1(Match):
>>return
>
>Something missing here?
Ugh; yes, sorry:
def shell_escape(Arg) :
"""returns Arg suitably escaped for use as a command-line argument
Cameron Laird wrote:
>def f1(Match):
>return
Something missing here?
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
>In message <[EMAIL PROTECTED]>, Cameron Laird wrote:
>
>> In article <[EMAIL PROTECTED]>,
>> Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
>>
>>>Cameron Laird wrote:
>>>
I've been trying to decide if there's any
In message <[EMAIL PROTECTED]>, Cameron Laird wrote:
> In article <[EMAIL PROTECTED]>,
> Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
>
>>Cameron Laird wrote:
>>
>>> I've been trying to decide if there's any sober reason to advocate
>>> the one-liner
>>>
>>> map(lambda i: a.__setitem__(i,
In article <[EMAIL PROTECTED]>,
Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
>Cameron Laird wrote:
>
>> I've been trying to decide if there's any sober reason to advocate
>> the one-liner
>>
>> map(lambda i: a.__setitem__(i, False), [x1, x2, x3, ..., x1024])
>
>Are lambdas like the Dark Sid
On Nov 25, 11:29 am, Iain King <[EMAIL PROTECTED]> wrote:
> On Nov 17, 7:41 pm, Tim Chase <[EMAIL PROTECTED]> wrote:
>
>
>
> > > It doesn't matter as none of this is valid Python. In Python you have to
> > > write
>
> > > array[x1] = False
> > > array[x2] = False
>
> > Uh...not so much...
>
> > >
On Nov 17, 7:41 pm, Tim Chase <[EMAIL PROTECTED]> wrote:
> > It doesn't matter as none of this is valid Python. In Python you have to
> > write
>
> > array[x1] = False
> > array[x2] = False
>
> Uh...not so much...
>
> >>> a = [1,2,3,4,5]
> >>> x1, x2 = 1, 3
> >>> a[x1] = a[x2] = False
> >>>
Cameron Laird wrote:
> I've been trying to decide if there's any sober reason to advocate
> the one-liner
>
> map(lambda i: a.__setitem__(i, False), [x1, x2, x3, ..., x1024])
Are lambdas like the Dark Side of Python?
:)
--
http://mail.python.org/mailman/listinfo/python-list
jzakiya <[EMAIL PROTECTED]> wrote:
>
>I looked online and in books, but couldn't find a definitive answer to
>this.
>
>I have an array and set multiple elements to either True or False at
>one time.
>
>Question: Which way is faster (or does it matter)?
Answer: it does not matter. This is prematur
On Nov 17, 2:54 pm, [EMAIL PROTECTED] (Cameron Laird) wrote:
> In article <[EMAIL PROTECTED]>,
> Tim Chase <[EMAIL PROTECTED]> wrote:
> .
> .
> .>To the OP, I think rather than cluttering my code,
> I'd just
> >create a loop
In article <[EMAIL PROTECTED]>,
Tim Chase <[EMAIL PROTECTED]> wrote:
.
.
.
>To the OP, I think rather than cluttering my code, I'd just
>create a loop
>
> for i in [x1,x2,x3,x4,...x1024]:
> a[i] = False
Arnaud Delobelle <[EMAIL PROTECTED]> writes:
> jzakiya <[EMAIL PROTECTED]> writes:
>
>> I looked online and in books, but couldn't find a definitive answer to
>> this.
>>
>> I have an array and set multiple elements to either True or False at
>> one time.
>>
>> Question: Which way is faster (or do
It doesn't matter as none of this is valid Python. In Python you have to
write
array[x1] = False
array[x2] = False
Uh...not so much...
>>> a = [1,2,3,4,5]
>>> x1, x2 = 1, 3
>>> a[x1] = a[x2] = False
>>> a
[1, False, 3, False, 5]
Works for me.
To the OP, I think rather than cluttering my
Arnaud Delobelle wrote:
> jzakiya <[EMAIL PROTECTED]> writes:
>
>> I looked online and in books, but couldn't find a definitive answer to
>> this.
>>
>> I have an array and set multiple elements to either True or False at
>> one time.
>>
>> Question: Which way is faster (or does it matter)?
>>
>>
On Nov 17, 2:10 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> jzakiya <[EMAIL PROTECTED]> writes:
> > I looked online and in books, but couldn't find a definitive answer to
> > this.
>
> > I have an array and set multiple elements to either True or False at
> > one time.
>
> > Question: Which w
jzakiya <[EMAIL PROTECTED]> writes:
> I looked online and in books, but couldn't find a definitive answer to
> this.
>
> I have an array and set multiple elements to either True or False at
> one time.
>
> Question: Which way is faster (or does it matter)?
>
> 1)
>
> array[x1]=array[x2]==
I looked online and in books, but couldn't find a definitive answer to
this.
I have an array and set multiple elements to either True or False at
one time.
Question: Which way is faster (or does it matter)?
1)
array[x1]=array[x2]== array[x10] = \
array[x11]=array[x12]=... = array[x20] =
31 matches
Mail list logo