"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 2007-11-05, Just Another Victim of the Ambient Morality
> <[EMAIL PROTECTED]> wrote:
>>
>> "Kay Schluehr" <[EMAIL PROTECTED]> wrote in message
>> news:
How do you change certain elements in a list? I'm looking to do the
Python equivalent of this Ruby code:
-> first = [1, 2]
=> [1, 2]
-> second = first
=> [1, 2]
-> first.map! {|i| i + 1}
=> [2, 3]
-> first
=> [2, 3]
-> second
=> [2, 3]
I need to change a list, in place, so o
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 2007-11-05, Just Another Victim of the Ambient Morality
> <[EMAIL PROTECTED]> wrote:
>> "Kay Schluehr" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PRO
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 2007-11-07, Just Another Victim of the Ambient Morality
> <[EMAIL PROTECTED]> wrote:
>> "Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PRO
"Chris Mellon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Nov 7, 2007 3:15 PM, Just Another Victim of the Ambient Morality
> <[EMAIL PROTECTED]> wrote:
>
>> > In short, it hasn't really evovled into a user-friendly package
&g
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Wed, 07 Nov 2007 21:15:50 +, Just Another Victim of the Ambient
> Morality wrote:
>
>> Why can't I find a pyparsing-esque library with this implementation?
>>
"Chris Mellon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Nov 7, 2007 5:15 PM, Just Another Victim of the Ambient Morality
> <[EMAIL PROTECTED]> wrote:
>>
>> "Chris Mellon" <[EMAIL PROTECTED]> wrote in message
>
I've done a google search on this but, amazingly, I'm the first guy to
ever need this! Everyone else seems to need the reverse of this. Actually,
I did find some people who complained about this and rolled their own
solution but I refuse to believe that Python doesn't have a built-in
solu
This won't compile for me:
regex = re.compile('(.*\\).*')
I get the error:
sre_constants.error: unbalanced parenthesis
I'm running Python 2.5 on WinXP. I've tried this expression with
another RE engine in another language and it works just fine which
"Paul Hankin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Nov 27, 3:48 pm, "Just Another Victim of the Ambient Morality"
> <[EMAIL PROTECTED]> wrote:
>> This won't compile for me:
>>
>> regex = re.compile(
xpects and iterable.
I'm pretty sure this something else doesn't need a list, either, and just
wants to iterate over elements.
Now, I could just make a list, using a list comprehension, performing my
operation on each element, and then pass that list on, knowing that it is
iterable. Howe
I'm looking for a linked list implementation. Something iterable with
constant time insertion anywhere in the list. I was wondering if deque() is
the class to use or if there's something else. Is there?
Thank you...
--
http://mail.python.org/mailman/listinfo/python-list
ks like the MySQLdb version doesn't match the _mysql version. If
these were two different libraries, I might understand how this error
happened. However, they're part of the same library. _mysql is just a
Python binding to the MySQL C API and MySQLdb is just a Python wrapper
arou
I'm confused by this behaviour:
import re
regex = re.compile('foo')
match = regex.match('whatfooever')
In my experience with regular expressions, regex should have found a
match. However, in this case regex.match() returns None. Why is that?
What am I missing?
Thank you...
-
I'm excited to use Python 3.0 (foolishly, it's the only Python
interpreter I have on my system) but there are no libraries for it beyond
the kitchen sink. Personally, a good start would be Beautiful Soup and
Mechanize. I could also use DB.
Has there been any word on Beautiful Soup?
contests.
>
> Criticism of a language is a pissing contest?
>
> Yeah, okay, I was a tad dismissive. I un-apologetically jump to strong
> impressions about languages based on minimal use -- but I'm also willing
> to change my mind. Ruby certainly looks to me like it has some ni
I'm desperately trying to declare an adjacency list table with
declarative_base() but I can't figure it out. Strangely, all the
documentation avoids declarative_base() like the plague and does everything
the hard way. What the hell is this thing for if we're not supposed to use
it?
If
101 - 117 of 117 matches
Mail list logo