Re: Guido's new method definition idea

2008-12-08 Thread Alex_Gaynor
I'm a huge -1 on this, it adds nothing to the language, and IMO violates quite a few Zens. -Beautiful is better than ugly. A bit subjective, but this is ugly IMO. -Special cases aren't special enough to break the rules. -There should be one-- and preferably only one --obvious way to do it. -- http

Re: "'int' object is not iterable" iterating over a dict

2008-10-05 Thread Alex_Gaynor
On Oct 5, 8:11 pm, mmiikkee13 <[EMAIL PROTECTED]> wrote: > >>> a_list = range(37) > >>> list_as_dict = dict(zip(range(len(a_list)), [str(i) for i in a_list])) > >>> for k, v in list_as_dict: > > ...     print k, v > ... > Traceback (most recent call last): >   File "", line 1, in > TypeError: 'int

Re: brackets content regular expression

2008-10-31 Thread Alex_Gaynor
On Oct 31, 1:25 pm, netimen <[EMAIL PROTECTED]> wrote: > I have a text containing brackets (or what is the correct term for > '>'?). I'd like to match text in the uppermost level of brackets. > > So, I have sth like: ' 123 < 1 aaa < t bbb < a ff > > 2 > > b'. How to match text between the

Re: is there really no good gui builder

2008-11-08 Thread Alex_Gaynor
On Nov 8, 6:29 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > azrael wrote: > > whoever I ask, everyone tells me when it come to python and GUI-s and > > that there is the best way to use WX. I am browsing for the 10th time > > during the last year and I can still not bealive that there is not one >

Re: Python 3.0 - is this true?

2008-11-08 Thread Alex_Gaynor
On Nov 8, 11:36 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote: > On 9 Nov., 05:04, Terry Reedy <[EMAIL PROTECTED]> wrote: > > > Have you written any Python code where you really wanted the old, > > unpredictable behavior? > > Sure: > > if len(L1) == len(L2): >     return sorted(L1) == sorted(L2)  # ch

Code generation architecture question

2008-11-13 Thread Alex_Gaynor
I'm trying to figure out what the best architecture for doing code generation would be. I have a set of ASTs that define a program, so what should I do to for code generation. As I see it the 2 choices are to have the ASTs have a generate code method that returns the correct code for themselves,

Re: What is the best Python GUI API?

2008-11-13 Thread Alex_Gaynor
On Nov 13, 7:08 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > rm wrote: > > On Nov 13, 2:23 pm, James Harris <[EMAIL PROTECTED]> > > wrote: > > >> On 13 Nov, 18:59, Stef Mientki <[EMAIL PROTECTED]> wrote: > > >>> Abah Joseph wrote: > >  What is the best Python GUI API? I am planning to start m

Re: Code generation architecture question

2008-11-14 Thread Alex_Gaynor
On Nov 14, 3:04 am, Aaron Brady <[EMAIL PROTECTED]> wrote: > On Nov 13, 7:16 pm, Alex_Gaynor <[EMAIL PROTECTED]> wrote: > > > I'm trying to figure out what the best architecture for doing code > > generation would be.  I have a set of ASTs that define a program,

Re: Ordered Sets

2009-03-30 Thread Alex_Gaynor
On Mar 30, 12:27 pm, pataphor wrote: > On Mon, 30 Mar 2009 03:30:04 -0500 > > Nick Craig-Wood wrote: > > >>> class Node(object): > > ...     __slots__ = ["prev", "next", "this"] > > ...     def __init__(self, prev, next, this): > > ...         self.prev = prev > > ...         self.next = next > >

Re: Ordered Sets

2009-03-31 Thread Alex_Gaynor
On Mar 31, 5:52 am, pataphor wrote: > On Tue, 31 Mar 2009 10:33:26 +0200 > > pataphor wrote: > > On Mon, 30 Mar 2009 19:57:39 -0700 (PDT) > > Alex_Gaynor wrote: > > > > I really like the Ordered Set class(I've been thinking about one > > > ever si

Re: Ordered Sets

2009-03-31 Thread Alex_Gaynor
On Mar 31, 11:06 am, pataphor wrote: > On Tue, 31 Mar 2009 06:03:13 -0700 (PDT) > > Alex_Gaynor wrote: > > My inclination would be to more or less *just* have it implement the > > set API, the way ordered dict does in 2.7/3.1. > > As far as I can tell all that wo

Re: lint for Python?

2008-10-04 Thread Alex_Gaynor
On Oct 3, 5:38 pm, Pat <[EMAIL PROTECTED]> wrote: > I've been searching for a good multi-module lint checker for Python and > I haven't found one yet. > > Pylint does a decent job at checking for errors only within a single module. > > Here's one of my problems.  I have two modules. > > In module o

Re: Poll: Do you use csv.Sniffer?

2009-09-24 Thread Alex_Gaynor
On Sep 24, 10:26 pm, s...@pobox.com wrote: > If you are a csv module user, I have a question for you:  Do you use the > csv.Sniffer class? > >     o Yes, frequently >     o Yes, on occasion >     o I tried it a few times but don't use it now >     o No, I don't need it >     o No, never heard of it