WinXP, Python3.1.2, dir-listing to XML - problem with unicode file names

2010-04-03 Thread kai_nerda
Hi, OS = Windows XP (German language) Python = 3.1.2 I need to write a directory listing into a XML file. And after hours of trying and searching i have no clue. My main problem is that the file and folder names can have characters of different languages like German, Turkish, Russian, maybe else

Re: Splitting a string

2010-04-03 Thread Peter Otten
Patrick Maupin wrote: > On Apr 2, 4:32 pm, Peter Otten <__pete...@web.de> wrote: > >> _split = re.compile(r"(\d+)").split >> def split(s): >> if not s: >> return () >> parts = _split(s) >> parts[1::2] = map(int, parts[1::2]) # because s is non-empty parts contains at l

Re: How to run python without python

2010-04-03 Thread Lie Ryan
On 04/03/10 06:24, John Bokma wrote: >> >> you think virtualbox could help? i wonder if one could run linux/ >> py2exe virtually on a win machine and get it working. > > Of course that works, a virtual windows machine is just a windows > machine ;-). > > Also that you can't do a "cross compilatio

Incorrect scope of list comprehension variables

2010-04-03 Thread Alain Ketterlin
Hi all, I've just spent a few hours debugging code similar to this: d = dict() for r in [1,2,3]: d[r] = [r for r in [4,5,6]] print d THe problem is that the "r" in d[r] somehow captures the value of the "r" in the list comprehension, and somehow kills the loop interator. The (unexpected) re

Re: Incorrect scope of list comprehension variables

2010-04-03 Thread Chris Rebert
On Sat, Apr 3, 2010 at 3:30 AM, Alain Ketterlin wrote: > I've just spent a few hours debugging code similar to this: > > d = dict() > for r in [1,2,3]: >    d[r] = [r for r in [4,5,6]] > print d > > THe problem is that the "r" in d[r] somehow captures the value of the > "r" in the list comprehensi

Re: Incorrect scope of list comprehension variables

2010-04-03 Thread Steven D'Aprano
On Sat, 03 Apr 2010 12:30:32 +0200, Alain Ketterlin wrote: > Hi all, > > I've just spent a few hours debugging code similar to this: > > d = dict() > for r in [1,2,3]: > d[r] = [r for r in [4,5,6]] > print d This isn't directly relevant to your problem, but why use a list comprehension in

Re: How to run python without python

2010-04-03 Thread David Cournapeau
On Sat, Apr 3, 2010 at 2:23 AM, Chris Rebert wrote: > On Fri, Apr 2, 2010 at 10:09 AM, danmcle...@yahoo.com > wrote: >> On Apr 1, 5:54 pm, Chris Rebert wrote: >>> On Thu, Apr 1, 2010 at 4:46 PM, Krister Svanlund >>> wrote: >>> > On Fri, Apr 2, 2010 at 1:36 AM, Spencer wrote: >>> >> Is there a

Re: off topic but please forgive me me and answer

2010-04-03 Thread superpollo
Patrick Maupin ha scritto: On Apr 2, 2:41 pm, Andreas Waldenburger wrote: While everyone else is mocking you: Can you please elaborate on why you want to know and what kind of problem you're trying to solve with this? Also, don't you think you should have picked a maths forum for this kind of

Re: off topic but please forgive me me and answer

2010-04-03 Thread Steve Holden
superpollo wrote: > Patrick Maupin ha scritto: >> On Apr 2, 2:41 pm, Andreas Waldenburger >> wrote: >> >>> While everyone else is mocking you: Can you please elaborate on why you >>> want to know and what kind of problem you're trying to solve with this? >>> Also, don't you think you should have p

Re: off topic but please forgive me me and answer

2010-04-03 Thread Mensanator
On Apr 3, 8:00 am, superpollo wrote: > Patrick Maupin ha scritto: > > > > > > > On Apr 2, 2:41 pm, Andreas Waldenburger > > wrote: > > >> While everyone else is mocking you: Can you please elaborate on why you > >> want to know and what kind of problem you're trying to solve with this? > >> Also,

Re: off topic but please forgive me me and answer

2010-04-03 Thread superpollo
Steve Holden ha scritto: superpollo wrote: Patrick Maupin ha scritto: On Apr 2, 2:41 pm, Andreas Waldenburger wrote: While everyone else is mocking you: Can you please elaborate on why you want to know and what kind of problem you're trying to solve with this? Also, don't you think you shoul

Re: off topic but please forgive me me and answer

2010-04-03 Thread superpollo
Mensanator ha scritto: On Apr 3, 8:00 am, superpollo wrote: Patrick Maupin ha scritto: On Apr 2, 2:41 pm, Andreas Waldenburger wrote: While everyone else is mocking you: Can you please elaborate on why you want to know and what kind of problem you're trying to solve with this? Also, don

Re: off topic but please forgive me me and answer

2010-04-03 Thread Steve Holden
superpollo wrote: > Steve Holden ha scritto: [...] >> If he agrees to that, then get him to agree that x * 1 == x for any x. >> >> If he agrees to that > > he does not, since "you cannot multiply something, and not getting some > more of it" ... he is stuck with the latin etimology of "multiply" >

Re: off topic but please forgive me me and answer

2010-04-03 Thread Martin P. Hellwig
On 04/03/10 14:38, Steve Holden wrote: If you think you will persuade a crackpot to drop his lunacy by logical argument you are clearly an optimist of the first water. But since I like a challenge (and bearing in mind this is OT so I don't claim to be an expert) you might try first of all persu

Re: off topic but please forgive me me and answer

2010-04-03 Thread Matthew Barnett
superpollo wrote: Steve Holden ha scritto: superpollo wrote: Patrick Maupin ha scritto: On Apr 2, 2:41 pm, Andreas Waldenburger wrote: While everyone else is mocking you: Can you please elaborate on why you want to know and what kind of problem you're trying to solve with this? Also, don'

Re: off topic but please forgive me me and answer

2010-04-03 Thread Steven D'Aprano
On Sat, 03 Apr 2010 15:43:41 +0100, Martin P. Hellwig wrote: > I am replying to this post not because I disagree but because it > postalogically fits the best (I am by no means an expert either). > > IMHO, the crackpot in this regard is actually partially right, > multiplication does mean that t

Re: off topic but please forgive me me and answer

2010-04-03 Thread Patrick Maupin
On Apr 3, 9:43 am, "Martin P. Hellwig" > IMHO, the crackpot in this regard is actually partially right, > multiplication does mean that the number must get bigger, however for > fractions you multiply four numbers, two numerators and two > denominators. The resulting numerator and denominator by th

Re: off topic but please forgive me me and answer

2010-04-03 Thread Patrick Maupin
On Apr 3, 8:00 am, superpollo wrote: > > sorry if I misunderstood. > > no no you understood prfectly *but* the thing is i am a regular in an > italian language math ng which is haunted by a crackpot who insists that > 1/2 * 1/2 cannot be 1/4, "because multiplication means getting bigger", > so i t

Re: off topic but please forgive me me and answer

2010-04-03 Thread superpollo
Patrick Maupin ha scritto: On Apr 3, 8:00 am, superpollo wrote: sorry if I misunderstood. no no you understood prfectly *but* the thing is i am a regular in an italian language math ng which is haunted by a crackpot who insists that 1/2 * 1/2 cannot be 1/4, "because multiplication means gettin

Re: off topic but please forgive me me and answer

2010-04-03 Thread Martin P. Hellwig
On 04/03/10 16:17, Steven D'Aprano wrote: On Sat, 03 Apr 2010 15:43:41 +0100, Martin P. Hellwig wrote: I am replying to this post not because I disagree but because it postalogically fits the best (I am by no means an expert either). IMHO, the crackpot in this regard is actually partially rig

Re: Splitting a string

2010-04-03 Thread Patrick Maupin
On Apr 3, 4:17 am, Peter Otten <__pete...@web.de> wrote: > Patrick Maupin wrote: > > On Apr 2, 4:32 pm, Peter Otten <__pete...@web.de> wrote: > > >> _split = re.compile(r"(\d+)").split > >> def split(s): > >>     if not s: > >>         return () > >>     parts = _split(s) > >>     parts[1::2] = map

passing command line arguments to executable

2010-04-03 Thread mcanjo
I have an executable (I don't have access to the source code) that processes some data. I double click on the icon and a Command prompt window pops up. The program asks me for the input file, I hit enter, and then it asks me for and output filename, I hit enter a second time and it goes off and doe

Re: passing command line arguments to executable

2010-04-03 Thread Patrick Maupin
On Apr 3, 11:09 am, mcanjo wrote: > I have an executable (I don't have access to the source code) that > processes some data. I double click on the icon and a Command prompt > window pops up. The program asks me for the input file, I hit enter, > and then it asks me for and output filename, I hit

Re: passing command line arguments to executable

2010-04-03 Thread Simon Brunning
On 3 April 2010 17:09, mcanjo wrote: > I have an executable (I don't have access to the source code) that > processes some data. I double click on the icon and a Command prompt > window pops up. The program asks me for the input file, I hit enter, > and then it asks me for and output filename, I h

Re: Get a method instance through 'getattr' but not superclass's method

2010-04-03 Thread Radhakrishna Bhat
thanks. It is working for simple classes. But now i am trying for complex objects. myclassinstance.__class__.dict__ returns Looping through the same returned dictproxy gives attributes of superclass. What am i doing wrong? On Fri, Mar 12, 2010 at 12:15 AM, Gabriel Genellina wrote: > En Thu, 1

Re: off topic but please forgive me me and answer

2010-04-03 Thread Mensanator
On Apr 3, 10:17 am, Steven D'Aprano wrote: > On Sat, 03 Apr 2010 15:43:41 +0100, Martin P. Hellwig wrote: > > I am replying to this post not because I disagree but because it > > postalogically  fits the best (I am by no means an expert either). > > > IMHO, the crackpot in this regard is actually

Re: off topic but please forgive me me and answer

2010-04-03 Thread Emile van Sebille
On 4/3/2010 8:46 AM Patrick Maupin said... On Apr 3, 9:43 am, "Martin P. Hellwig"> IMHO, the crackpot in this regard is actually partially right, multiplication does mean that the number must get bigger, however for fractions you multiply four numbers, two numerators and two denominators. The r

Re: off topic but please forgive me me and answer

2010-04-03 Thread Steve Holden
Mensanator wrote: [...] > When dealing with crackpots, it does not help to use the > wrong arguments. [...] Correct. Unfortunately, it doesn't help to use the right ones either. In fact, that could almost be a definition of "crackpot" (and alas now we approach territory where we risk offending th

Re: off topic but please forgive me me and answer

2010-04-03 Thread Patrick Maupin
On Apr 3, 11:59 am, Emile van Sebille wrote: > On 4/3/2010 8:46 AM Patrick Maupin said... > > > On Apr 3, 9:43 am, "Martin P. Hellwig">  IMHO, the crackpot in this > > regard is actually partially right, > >> multiplication does mean that the number must get bigger, however for > >> fractions you

Re: passing command line arguments to executable

2010-04-03 Thread mcanjo
On Apr 3, 11:15 am, Patrick Maupin wrote: > On Apr 3, 11:09 am, mcanjo wrote: > > > I have an executable (I don't have access to the source code) that > > processes some data. I double click on the icon and a Command prompt > > window pops up. The program asks me for the input file, I hit enter,

Re: passing command line arguments to executable

2010-04-03 Thread Patrick Maupin
On Apr 3, 12:20 pm, mcanjo wrote: > On Apr 3, 11:15 am, Patrick Maupin wrote: > > > > > On Apr 3, 11:09 am, mcanjo wrote: > > > > I have an executable (I don't have access to the source code) that > > > processes some data. I double click on the icon and a Command prompt > > > window pops up. Th

Re: off topic but please forgive me me and answer

2010-04-03 Thread MRAB
Patrick Maupin wrote: On Apr 3, 11:59 am, Emile van Sebille wrote: On 4/3/2010 8:46 AM Patrick Maupin said... On Apr 3, 9:43 am, "Martin P. Hellwig"> IMHO, the crackpot in this regard is actually partially right, multiplication does mean that the number must get bigger, however for fraction

Re: (a==b) ? 'Yes' : 'No'

2010-04-03 Thread John Bokma
Steve Howell writes: > In languages like Ruby/Perl the inverted if statement is also a useful > idiom to emphasize concisely that code is exceptional in nature: > > def quotient(m, n) > # guard code > return None if n == 0 > > # happy path > return m / n > end Still, in Perl I prefer: sub q

Re: off topic but please forgive me me and answer

2010-04-03 Thread Patrick Maupin
On Apr 3, 12:39 pm, MRAB wrote: > Patrick Maupin wrote: > > On Apr 3, 11:59 am, Emile van Sebille wrote: > >> On 4/3/2010 8:46 AM Patrick Maupin said... > > >>> On Apr 3, 9:43 am, "Martin P. Hellwig">  IMHO, the crackpot in this > >>> regard is actually partially right, > multiplication does

"JOBS IN CANADA" "CANADA JOBS" "JOBS IN CANADA FOR FOREIGNERS" "ACCOUNTS JOBS IN CANADA" "FINANCE JOBS IN CANADA" MEDICAL JOBS IN CANADA" "ENGINEERING JOBS IN CANADA" "SPORTS JOBS IN CANADA" http://j

2010-04-03 Thread saima81
"JOBS IN CANADA" "CANADA JOBS" "JOBS IN CANADA FOR FOREIGNERS" "ACCOUNTS JOBS IN CANADA" "FINANCE JOBS IN CANADA" MEDICAL JOBS IN CANADA" "ENGINEERING JOBS IN CANADA" "SPORTS JOBS IN CANADA" http://jobsincanada-net.blogspot.com/ "JOBS IN CANADA" "CANADA JOBS" "JOBS IN CANADA FOR F

Re: off topic but please forgive me me and answer

2010-04-03 Thread Andreas Waldenburger
On Sat, 03 Apr 2010 13:13:38 -0400 Steve Holden wrote: > Correct. Unfortunately, it doesn't help to use the right ones either. > In fact, that could almost be a definition of "crackpot" (and alas now > we approach territory where we risk offending the religious, so I will > cease and desist). E

Re: Good Intermediate Tutorials

2010-04-03 Thread python
Pick an arbitrary point in time, and begin reading this mailing list's archives. I guarantee you will learn alot. Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: C-style static variables in Python?

2010-04-03 Thread Stephen Hansen
On 2010-04-02 20:24:46 -0700, Patrick Maupin said: On Apr 2, 10:11 pm, Stephen Hansen wrote: I don't know if properties are really faster or slower then a __getattr__, but I find them a lot cleaner if I want to delay some calculation until needed like that. Well, the relative speed of prope

Re: off topic but please forgive me me and answer

2010-04-03 Thread Martin P. Hellwig
On 04/03/10 16:46, Patrick Maupin wrote: On Apr 3, 9:43 am, "Martin P. Hellwig"> IMHO, the crackpot in this regard is actually partially right, multiplication does mean that the number must get bigger, however for fractions you multiply four numbers, two numerators and two denominators. The res

Re: WinXP, Python3.1.2, dir-listing to XML - problem with unicode file names

2010-04-03 Thread Mark Tolonen
"kai_nerda" wrote in message news:hp69ri+a...@egroups.com... Hi, OS = Windows XP (German language) Python = 3.1.2 I need to write a directory listing into a XML file. And after hours of trying and searching i have no clue. My main problem is that the file and folder names can have characters

Re: Get a method instance through 'getattr' but not superclass's method

2010-04-03 Thread Gabriel Genellina
Please reply inline; top posting is harder to read. On Fri, Mar 12, 2010 at 12:15 AM, Gabriel Genellina wrote: En Thu, 11 Mar 2010 01:47:30 -0300, Radhakrishna Bhat escribió: I am using getattr to get a method instance from a class. But it also returns methods from the superclass. How to de

How to access args as a list?

2010-04-03 Thread kj
Suppose I have a function with the following signature: def spam(x, y, z): # etc. Is there a way to refer, within the function, to all its arguments as a single list? (I.e. I'm looking for Python's equivalent of Perl's @_ variable.) I'm aware of locals(), but I want to preserve the order

Re: How to access args as a list?

2010-04-03 Thread Andreas Waldenburger
On Sat, 3 Apr 2010 22:58:43 + (UTC) kj wrote: > The best I have managed looks like this: > > class _Spam(object): > def __init__(self, x, y, z): > self.__dict__ = OrderedDict(()) > for p in inspect.getargspec(_Spam.__init__).args[1:]: > self.__dict__[p] = loc

Re: How to access args as a list?

2010-04-03 Thread Tim Chase
kj wrote: Suppose I have a function with the following signature: def spam(x, y, z): # etc. Is there a way to refer, within the function, to all its arguments as a single list? (I.e. I'm looking for Python's equivalent of Perl's @_ variable.) It sounds like you want the "*" operator f

Re: How to access args as a list?

2010-04-03 Thread MRAB
kj wrote: Suppose I have a function with the following signature: def spam(x, y, z): # etc. Is there a way to refer, within the function, to all its arguments as a single list? (I.e. I'm looking for Python's equivalent of Perl's @_ variable.) I'm aware of locals(), but I want to preserv

Re: How to access args as a list?

2010-04-03 Thread Rolando Espinoza La Fuente
On Sat, Apr 3, 2010 at 6:28 PM, kj wrote: > Is there a way to refer, within the function, to all its arguments > as a single list?  (I.e. I'm looking for Python's equivalent of > Perl's @_ variable.) > def spam(*args, **kwargs): print args print kwargs class Spam: def __init__(self,

Question on templates and python logging

2010-04-03 Thread David LePage
Hi - I have been struggling with this problem for quite some time and was hoping somebody could give me some pointers. I have a wxPython front end wizard that collects some information and outputs some HTML pages (not hosted by a web server, but viewable locally on the machine running the appli

Re: How to access args as a list?

2010-04-03 Thread kj
In kj writes: >Suppose I have a function with the following signature: >def spam(x, y, z): ># etc. >Is there a way to refer, within the function, to all its arguments >as a single list? (I.e. I'm looking for Python's equivalent of >Perl's @_ variable.) >I'm aware of locals(), but I want

Re: How to access args as a list?

2010-04-03 Thread kj
In kj writes: >In kj writes: >>Suppose I have a function with the following signature: >>def spam(x, y, z): >># etc. >>Is there a way to refer, within the function, to all its arguments >>as a single list? (I.e. I'm looking for Python's equivalent of >>Perl's @_ variable.) >>I'm aware

Re: (a==b) ? 'Yes' : 'No'

2010-04-03 Thread Lawrence D'Oliveiro
In message , Steve Holden wrote: > Lawrence D'Oliveiro wrote: > >> By the way, you don’t need the parentheses. > > But at the same time, if you don't *absolutely know* you don't need the > parentheses ... But you can “abolutely know”—it’s all spelled out here

Re: How to access args as a list?

2010-04-03 Thread Andreas Waldenburger
On Sat, 3 Apr 2010 23:52:42 + (UTC) kj wrote: > In kj writes: > > [snip] > >P.S. this is just an example; the function I want to implement has > >more parameters in its signature, with longer, more informative > >names. > > Andreas, perhaps this paragraph explains why I find your solution

Re: How to access args as a list?

2010-04-03 Thread Grant Edwards
On 2010-04-03, kj wrote: > In kj writes: > >>Suppose I have a function with the following signature: > >>def spam(x, y, z): >># etc. > >>Is there a way to refer, within the function, to all its arguments >>as a single list? (I.e. I'm looking for Python's equivalent of >>Perl's @_ variable.)

Re: Encryption source code with md5

2010-04-03 Thread Lawrence D'Oliveiro
In message <4baf3ac4$0$22903$e4fe5...@news.xs4all.nl>, Irmen de Jong wrote: > On 28-3-2010 12:08, Lawrence D'Oliveiro wrote: > >> Don’t use MD5. > > Also, md5 is not an encryption algorithm at all, it is a secure hashing > function. You can use hash functions for encryption. -- http://mail.pyth

Re: off topic but please forgive me me and answer

2010-04-03 Thread Steven D'Aprano
On Sat, 03 Apr 2010 09:35:34 -0700, Mensanator wrote: > On Apr 3, 10:17 am, Steven D'Aprano cybersource.com.au> wrote: >> On Sat, 03 Apr 2010 15:43:41 +0100, Martin P. Hellwig wrote: >> > I am replying to this post not because I disagree but because it >> > postalogically  fits the best (I am by

Re: off topic but please forgive me me and answer

2010-04-03 Thread Steven D'Aprano
On Sat, 03 Apr 2010 10:56:37 -0700, Patrick Maupin wrote: >> The square root of 2 is irrational, but if you multiply it by itself >> then the result isn't irrational, so not all operations involving >> irrational numbers will result in an irrational result (unless that's >> what you mean by "close

Re: (a==b) ? 'Yes' : 'No'

2010-04-03 Thread Steven D'Aprano
On Sun, 04 Apr 2010 12:26:05 +1200, Lawrence D'Oliveiro wrote: > In message , Steve > Holden wrote: > >> Lawrence D'Oliveiro wrote: >> >>> By the way, you don’t need the parentheses. >> >> But at the same time, if you don't *absolutely know* you don't need the >> parentheses ... > > But you can

Re: Encryption source code with md5

2010-04-03 Thread Steven D'Aprano
On Sun, 04 Apr 2010 13:21:34 +1200, Lawrence D'Oliveiro wrote: > In message <4baf3ac4$0$22903$e4fe5...@news.xs4all.nl>, Irmen de Jong > wrote: > >> On 28-3-2010 12:08, Lawrence D'Oliveiro wrote: >> >>> Don’t use MD5. >> >> Also, md5 is not an encryption algorithm at all, it is a secure hashing >

Re: Splitting a string

2010-04-03 Thread Steven D'Aprano
On Sat, 03 Apr 2010 11:17:36 +0200, Peter Otten wrote: >> That's certainly faster than a list comprehension (at least on long >> lists), but it might be a little obscure why the "if not s:" is needed, > > The function is small; with a test suite covering the corner cases and > perhaps a comment*

Re: off topic but please forgive me me and answer

2010-04-03 Thread Patrick Maupin
On Apr 3, 9:24 pm, Steven D'Aprano wrote: > To put it another way, even though there are an infinite number of > rationals, they are vanishingly rare compared to the irrationals. If you > could choose a random number from the real number line, it almost > certainly would be irrational. Yet anothe

Re: Splitting a string

2010-04-03 Thread Alf P. Steinbach
* Steven D'Aprano: Tests which you know can't fail are called assertions, pre-conditions and post-conditions. We test them because if we don't, they will fail :) :-) It's the umbrella law. Cheers, - Alf -- http://mail.python.org/mailman/listinfo/python-list

Re: How to access args as a list?

2010-04-03 Thread Steven D'Aprano
On Sat, 03 Apr 2010 22:58:43 +, kj wrote: > Suppose I have a function with the following signature: > > def spam(x, y, z): > # etc. > > Is there a way to refer, within the function, to all its arguments as a > single list? (I.e. I'm looking for Python's equivalent of Perl's @_ > variabl

Re: Splitting a string

2010-04-03 Thread Patrick Maupin
On Apr 3, 10:00 pm, Steven D'Aprano wrote: > Tests which you know can't fail are called assertions, pre-conditions and > post-conditions. We test them because if we don't, they will fail :) Well, yes, but that can get rather tedious at times: a = 1 assert 0 < a < 2 b = a + 3 assert 2 < b - a < 4

Re: Question on templates and python logging

2010-04-03 Thread Gabriel Genellina
En Sat, 03 Apr 2010 20:42:20 -0300, David LePage escribió: The problem that i'm trying to solve is taking data collected along the way and outputting this into these HTML pages. [...] I was hoping I could tie the logging classes into something like this, where I was leveraging an HTML tem

Re: How to keep effects of image filters going for some seconds?

2010-04-03 Thread Vincent Ren
On Mar 22, 6:00 am, Terry Reedy wrote: > On 3/21/2010 3:23 AM, Ren Wenshan wrote: > > > > > Hello, every pythoner. > > > Firstly, I want to mention that English is my second language, so > > maybe there are some sentences which makes you confused, sorry. > > > I have been learning Panda3D, an open

Re: Incorrect scope of list comprehension variables

2010-04-03 Thread Tim Roberts
Alain Ketterlin wrote: > >I've just spent a few hours debugging code similar to this: > >d = dict() >for r in [1,2,3]: >d[r] = [r for r in [4,5,6]] >print d Yes, this has been fixed in later revisions, but I'm curious to know what led you to believe that a list comprehension created a new sco

Build A Home Internet Business For Extra Income Stream

2010-04-03 Thread Earn Money
Why build a residential home internet concern in the primary place? Believe it or not, the the human race saving is changing. While Multinational expanding to total saving, employees are the Mainly vulnerable classify of folks. Therefore, looking into A secondary earnings like build a residential h

Re: Good Intermediate Tutorials

2010-04-03 Thread Andrew Ellis
That's actually why I picked up this list, and it's done a lot to help. +1 for sure On Sat, Apr 3, 2010 at 2:52 PM, wrote: > Pick an arbitrary point in time, and begin reading this mailing list's > archives. I guarantee you will learn alot. > > Malcolm > -- > http://mail.python.org/mailman/listi

Re: off topic but please forgive me me and answer

2010-04-03 Thread Mensanator
On Apr 3, 9:03 pm, Steven D'Aprano wrote: > On Sat, 03 Apr 2010 09:35:34 -0700, Mensanator wrote: > > On Apr 3, 10:17 am, Steven D'Aprano > cybersource.com.au> wrote: > >> On Sat, 03 Apr 2010 15:43:41 +0100, Martin P. Hellwig wrote: > >> > I am replying to this post not because I disagree but bec

Re: Incorrect scope of list comprehension variables

2010-04-03 Thread Steve Howell
On Apr 3, 9:58 pm, Tim Roberts wrote: > Alain Ketterlin wrote: > > >I've just spent a few hours debugging code similar to this: > > >d = dict() > >for r in [1,2,3]: > >    d[r] = [r for r in [4,5,6]] > >print d > > Yes, this has been fixed in later revisions, but I'm curious to know what > led yo