Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Just Another Victim of the Ambient Morality
"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 I change elements in a list?

2007-11-06 Thread Just Another Victim of the Ambient Morality
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

Re: Is pyparsing really a recursive descent parser?

2007-11-07 Thread Just Another Victim of the Ambient Morality
"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

Re: Is pyparsing really a recursive descent parser?

2007-11-07 Thread Just Another Victim of the Ambient Morality
"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

Re: Is pyparsing really a recursive descent parser?

2007-11-07 Thread Just Another Victim of the Ambient Morality
"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

Re: Is pyparsing really a recursive descent parser?

2007-11-07 Thread Just Another Victim of the Ambient Morality
"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? >>

Re: Is pyparsing really a recursive descent parser?

2007-11-07 Thread Just Another Victim of the Ambient Morality
"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 >

How do I convert escaped HTML into a string?

2007-11-23 Thread Just Another Victim of the Ambient Morality
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

A bug in Python's regular expression engine?

2007-11-27 Thread Just Another Victim of the Ambient Morality
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

Re: A bug in Python's regular expression engine?

2007-11-27 Thread Just Another Victim of the Ambient Morality
"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(&#x

How do I not make a list?

2007-11-29 Thread Just Another Victim of the Ambient Morality
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

Are Python deques linked lists?

2007-12-09 Thread Just Another Victim of the Ambient Morality
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

Bad hack fix around a bizarre problem...

2009-01-11 Thread Just Another Victim of the Ambient Morality
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

Why doesn't this RE match?

2009-02-06 Thread Just Another Victim of the Ambient Morality
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... -

Any news on when some libraries will be ported to Python 3.0?

2009-01-07 Thread Just Another Victim of the Ambient Morality
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?

Re: Confessions of a Python fanboy

2009-08-05 Thread Just Another Victim of the Ambient Morality
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

Adjacency lists with sqlalchemy...

2009-09-03 Thread Just Another Victim of the Ambient Morality
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

<    1   2