Re: Grouping code by indentation - feature or ******?

2005-03-29 Thread Myles Strous
I wrote: > It can be quite useful for inserting something into a list (or string), > after finding the position where you wish to insert it. Oops, I missed Dennis Lee Bieber's working example of exactly that. My apologies. Regars, Myles. -- http://mail.python.org/mailman/listinfo/python-list

Re: itertools to iter transition (WAS: Pre-PEP: Dictionary accumulator methods)

2005-03-29 Thread Terry Reedy
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Terry Reedy wrote: >> "Steven Bethard" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>>True it's not a huge win. But I'd argue that for the same reasons that >>>dict.fromkeys is a dict classmeth

Re: BF interpreter in Python

2005-03-29 Thread Do Re Mi chel La Si Do
Hi ! Good idea. I take this interpreter with jubilation. Can I add your URL at http://mclaveau.com/esolang ? Other question : do you know PATH ? (http://pathlang.sourceforge.net) @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: instance vs class attributes

2005-03-29 Thread James Stroud
You need 2 underscores to mangle. On Tuesday 29 March 2005 09:58 pm, runsun pan wrote: > >>> shy._Shy__mangled_method() > > Ive been mangled! > > > Hi Brian, > > can you explain how this could possibly work? First of all it's not > standard python usage, > and secondly it's not working on my compu

Re: itertools to iter transition (WAS: Pre-PEP: Dictionary accumulator methods)

2005-03-29 Thread Steven Bethard
Terry Reedy wrote: But if classmethods are intended to provide alternate constructors But I do not remember that being given as a reason for classmethod(). But I am not sure what was. Well I haven't searched thoroughly, but I know one place that it's referenced is in descrintro[1]: "Factoid: __

Re: Grouping code by indentation - feature or ******?

2005-03-29 Thread Tim Roberts
"Terry Reedy" <[EMAIL PROTECTED]> wrote: > >"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> 1) The stuff doesn't has to be spread over multiple pages. One >> can have 2 functions, each about three quarter of a page. >> The second function will then cross a page

Re: Trouble with RC2

2005-03-29 Thread Do Re Mi chel La Si Do
Hi ! Yes, P4RC2 is a error ; it is Python 2.4.1 release candidate 2 Yes, P2.4 is Python 2.4 The scripts use ONLY space-indentation. But the important points are : - if I install Python 2.4 on the rc2 (overwrite), then problem disappears, with the SAME scripts. - the problem is only wi

Re: itertools to iter transition (WAS: Pre-PEP: Dictionary accumulator methods)

2005-03-29 Thread Ville Vainio
> "Steven" == Steven Bethard <[EMAIL PROTECTED]> writes: Steven> to be documented as a builtin type. I don't find the Steven> argument "builtin type methods are hard to find" Steven> convincing -- the solution here is to fix the Steven> documentation, not refuse to add builtin

IMAP4.search by message-id ?

2005-03-29 Thread Sean Dodsworth
Can anyone tell me how to get a message's number from the message-id using IMAP4.search? I've tried this: resp, items = server.search(None, 'HEADER', '"Message-id"', msgID) but it gives me a 'bogus search criteria' error Any ideas? -- http://mail.python.org/mailman/listinfo/python-list

Re: Why tuple with one item is no tuple

2005-03-29 Thread Antoon Pardon
Op 2005-03-29, Ville Vainio schreef <[EMAIL PROTECTED]>: >> "Antoon" == Antoon Pardon <[EMAIL PROTECTED]> writes: > >Antoon> Op 2005-03-27, Joal Heagney schreef <[EMAIL PROTECTED]>: > >> Antoon Pardon wrote: > >> > >>> So python choose a non-deterministic direction. To me (2,3)

Re: [maintenance doc updates]

2005-03-29 Thread Do Re Mi chel La Si Do
Hi ! Thanks. But, for previous versions of Python, I downloaded a CHM version; and, at http://docs.python.org/download.html, I don't found this format. is this a lapse of memory? Would it be possible to have a continuity in the availability of the formats? Thanks again. Michel Claveau

Re: Things you shouldn't do

2005-03-29 Thread Andrew Dalke
Steve wrote: > [an anecdote on distinguishing l1 and 11] > What are some of other people's favourite tips for > avoiding bugs in the first place, as opposed to finding > them once you know they are there? There's a good book on this topic - Writing Solid Code. A

Re: Queue.Queue-like class without the busy-wait

2005-03-29 Thread Paul Rubin
Antoon Pardon <[EMAIL PROTECTED]> writes: > > There needs to be a way to send signals to threads, or raise > > asynchronous exceptions in them. There's been some discussion in > > sourceforge about that, but the issues involved are complex. > > Well I have raised this issue before and as far as I

Re: IMAP4.search by message-id ?

2005-03-29 Thread Max M
Sean Dodsworth wrote: Can anyone tell me how to get a message's number from the message-id using IMAP4.search? I've tried this: resp, items = server.search(None, 'HEADER', '"Message-id"', msgID) but it gives me a 'bogus search criteria' error Why do you need the 'HEADER' Wouldn't this be enou

Re: Weakrefs to classes that derive from str

2005-03-29 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Steven Bethard <[EMAIL PROTECTED]> wrote: > Ron Garret wrote: > > Why doesn't this work? > > > from weakref import ref > class C(str): pass > > ... > ref(C()) > > Traceback (most recent call last): > > File "", line 1, in ? > > TypeError: cannot cre

newbie - threading

2005-03-29 Thread martijn
H!, I have made a spider and now I want to use threading so it will be faster faster and faster :) But I don't understand threading. So I try this but I get a error in windows 2000. --- class connector(threading.Thread): def __init__(self,url): self.url = url threading

Re: Overriding methods in classes you don't control

2005-03-29 Thread Amaury Forgeot d'Arc
Alex VanderWoude a écrit : Here's the situation. I'm using wxPython, and I want to make an enhancement in the __init__ method of all the frame classes. The ideal place to do this is in wxFrame.__init__, since any change there will automatically be inherited by the other frame classes (for example,

Re: Overriding methods in classes you don't control

2005-03-29 Thread Amaury Forgeot d'Arc
Alex VanderWoude a écrit : Here's the situation. I'm using wxPython, and I want to make an enhancement in the __init__ method of all the frame classes. The ideal place to do this is in wxFrame.__init__, since any change there will automatically be inherited by the other frame classes (for example,

Re: Optimisation Hints (dict processing and strings)

2005-03-29 Thread OPQ
#For the record, I'm not on premature optimisation anymore. #The code is working. I just want to save hours of computing, without relying to much on C extensions. #Nevertheless, thansk for tips, clarifications and explanations. > longone=longone + char # where len(char)== 1 > > > > I known t

Re: newbie - threading

2005-03-29 Thread MyHaz
Posting the error message could help. Also you might check out this example http://thraxil.org/thread.txt - Haz -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3