Steven Bethard wrote:
Steve Holden wrote:
Steven Bethard wrote:
Antoon Pardon wrote:
Can anyone explain why descriptors only work when they are an attribute
to an object or class. I think a lot of interesting things one can
do with descriptors would be just as interesting if the object stood
on
Richard Shea schrieb:
'DOCUMENTCOMPLETE' seems fairly self-explanatory but others such as
'BEFORENAVIGATE2' and 'STATUSTEXTCHANGE' are less guessable.
I've looked at (what I think is) the MS documentation but I cannot
find references to any of these events - can anyone point me
information please
[EMAIL PROTECTED] wrote:
I am just wondering which technologies google is using for gmail and
Google Groups???
The short answer:
They use computer technology!!! :-)
David
--
http://mail.python.org/mailman/listinfo/python-list
Przemysaw Rycki wrote:
Hello,
I have written some code, which creates many threads for each connection
('main connection'). The purpose of this code is to balance the load
between several connections ('pipes'). The number of spawned threads
depends on how many pipes I create (= 2*n+2, where n
Tuesday March 1st is the first Tuesday of the month and the Vancouver
Python, Zope and Plone user's group will have its monthly meeting at
ActiveState (580 Granville) at 7:00.
The topic is GNU Radio and Python.
GNU Radio is a free software implementation of Software Defined Radio.
Imagine if
I am trying to start two threads to do some time consuming work. This is my
first stab at threading, and it isn't working as I expect. Instead of the
threads starting when I call start(), they seem to run the target code as
part of the constructor call.
Here is my test code...
#!/usr/bin/python
On Tue, 01 Mar 2005 12:42:51 -0600, Skip Montanaro wrote:
yield expr
yield *expr
(Mu-hu-ha-ha-ha!)
--
http://mail.python.org/mailman/listinfo/python-list
Hello @ all,
we have written a small program (code below) for our own
in-developement rpg system, which is getting values for 4
RPG-Characters and doing some calculations with it.
now we're trying hard to find out how to get it working with 'n'
Characters, so you will be asked to enter a number
On 2005-03-01, Steve Horsley [EMAIL PROTECTED] wrote:
I am trying to start two threads to do some time consuming work. This is my
first stab at threading, and it isn't working as I expect. Instead of the
threads starting when I call start(), they seem to run the target code as
part of the
Hi,
You absolutely and definitively have my vote.
When I first learned the generators , I was even wondering if there was
something wrong in what I do when faced with the sub-generators problem you
describe. I was wondering why am I doing this extra for-loop ? Is there
something wrong ? Can
Gary Ruben wrote:
OK, I've managed to get this to work with Rainer's method, but I
realised it is not the best way to do it, since the methods are being
added by the constructor, i.e. they are instance methods. This means
that every time a foo object is created, a whole lot of code is being
Steven Bethard steven.bethard at gmail.com writes:
David S. wrote:
I am looking for a way to implement the same simple validation on many
instance attributes and I thought descriptors
(http://users.rcn.com/python/download/Descriptor.htm) looked like the
right tool.
Looks like
Hi!
Given a string, I want to find all ocurrences of
certain predefined words in that string. Problem is, the list of
words that should be detected can be in the order of thousands.
With the re module, this can be solved something like this:
import re
r =
Skip Montanaro wrote:
...
If this idea advances I'd rather see extra syntactic sugar introduced to
complement the current yield statement instead of adding a new keyword.
It's a bit clumsy to come up with something that will work syntactically
since the next token following the yield keyword can
I have a file named testPython.py as shown below.
I have shown a trace of the Interpreter Session in which I import the
modules from this file using the command:
from testPython import *
When I do this, and modify a global variable from within a function, it
seems that the interpreter is
Le mardi 1 Mars 2005 16:52, Marc Huffnagle a écrit :
[line for line in document if (line.find('word') != -1 \
and line.find('wordtwo') != -1)]
Hi,
Using re might be faster than scanning the same line twice :
=== begin snap
## rewords.py
import re
import sys
def iWordsMatch(lines,
[André Søreng]
Given a string, I want to find all ocurrences of
certain predefined words in that string. Problem is, the list of
words that should be detected can be in the order of thousands.
With the re module, this can be solved something like this:
import re
r =
Mike C. Fletcher wrote:
... it nicely encapsulates the learning of generators so that
when you see yield up front you know something generatish is going on.
+1 for generatish as VOTW (Vocabulation of the Week). =)
STeVe
--
http://mail.python.org/mailman/listinfo/python-list
André Søreng wrote:
Hi!
Given a string, I want to find all ocurrences of
certain predefined words in that string. Problem is, the list of
words that should be detected can be in the order of thousands.
With the re module, this can be solved something like this:
import re
r =
Hi
I'm creating a program in Tkinter and I would need
help to create a close button for dialog windows.
One of my typical dialog windows look like this:
def show_window(self):
top = Toplevel()
Label(top, text=Some text).pack()
Label(top, text=Some more text).pack()
Hi, I've only been using python for two days now but I'm working on it.
I have the following text:
selectoption/optionoption/option/selectselectoption/option/select
My question is how can I specify to only work with the first instance
of select.../select via any sort of substitute. If that isn't
Grant Edwards wrote:
On 2005-03-01, Steve Horsley [EMAIL PROTECTED] wrote:
I am trying to start two threads to do some time consuming work. This is my
first stab at threading, and it isn't working as I expect. Instead of the
threads starting when I call start(), they seem to run the target code
[EMAIL PROTECTED] wrote:
from testPython import *
When I do this, and modify a global variable from within a function, it
seems that the interpreter is unaware of the updated value!
Uh... don't do this then.
Beginners to Python should never use the from xxx import * form,
as this is just one of
Steven Bethard wrote:
Nick Coghlan wrote:
Hmm, it might be nice if there was a UserList.ListMixin that was the
counterpart to UserDict.DictMixin
I've thought this occasionally too. One of the tricky issues though is
that often you'd like to define __getitem__ for single items and have
In article [EMAIL PROTECTED],
Douglas Alan [EMAIL PROTECTED] wrote:
Cetainly, if yield_all
iterator == for i in iterator: yield i, I don't see how anything
is gained except for a few keystrokes.
What's gained is making one's code more readable and maintainable,
which is the one of the
[EMAIL PROTECTED] wrote:
I have a file named testPython.py as shown below.
I have shown a trace of the Interpreter Session in which I import the
modules from this file using the command:
from testPython import *
When I do this, and modify a global variable from within a function, it
seems that
Przemysaw Rycki napisa(a):
- Is there any 'upper boundary' that limits the number of threads? (is
it python / OS related)
- Is that the sign of 'clumsy programming' - i.e. Is creating so many
threads a bad habit? (I must say that it simplified the solution of my
problem very much).
I've read
I cannot figure out how to specify a list of a
particular size.
For example, I want to construct a list of size 10,
how do I do this?
__
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
David S. wrote:
This still fails to work for instances variables of the class. That is
if I use your property in the following:
py ...class Flags(object):
...def __init__(self):
... a = singlechar
...
you should write that as:
class Flags(object):
a = singlechar
def
Tonino a écrit :
Hi,
I have a small Tkinter app that gets data from a socket connection to a
server. The app has a Text() widget to display the info that it gets
from the socket connection. I have the ability to stop the text at any
point.
What I want to be able todo is select a line from the
I am working with a 3rd party credit card company that is using Python
version 2.2.2. They are using the httplib module to post data to my
server which is a dedicated server with no firewall or any
rate-limiting or DDoS prevention.
Every time they try, the first 2 posts are successful and it
On 2005-03-01, Steve Horsley [EMAIL PROTECTED] wrote:
t1 = threading.Thread(target=fiddle())
t2 = threading.Thread(target=fiddle())
t1 = threading.Thread(target=fiddle)
t2 = threading.Thread(target=fiddle)
Doh! Slap that forehead!
Of course, I was calling fiddle() and using the
return
Anthony Liu wrote:
I cannot figure out how to specify a list of a
particular size.
For example, I want to construct a list of size 10,
how do I do this?
A list does not have a fixed size (as you probably know)
But you can initialize it with 10 somethings
[None]*10
[None, None, None, None,
chris [EMAIL PROTECTED] writes:
What is the proper way to use ctypes to access an exported Function in
a dll file on windows? I must be missing something because I get
memory leaks when I use it:
import ctypes
import gc
gc.enable()
gc.set_debug(gc.DEBUG_LEAK)
lib =
chris [EMAIL PROTECTED] writes:
What is the proper way to use ctypes to access an exported Function in
a dll file on windows? I must be missing something because I get
memory leaks when I use it:
import ctypes
import gc
gc.enable()
gc.set_debug(gc.DEBUG_LEAK)
lib =
David S. wrote:
Steven Bethard steven.bethard at gmail.com writes:
Looks like you're trying to reinvent the property descriptor. Try using
the builtin property instead:
py def getchar(self):
... if not hasattr(self, '_char'):
... self._char = None
... return self._char
...
py
So, am I misinterpreting what gc.collect is printing, and there is
actually no memory leak?
Or if I'm not and there actually is a problem, Is there a better way to
use ctypes so that I don't have to modify the module?
--
http://mail.python.org/mailman/listinfo/python-list
Yes, that's helpful. Thanks a lot.
But what if I wanna construct an array of arrays like
we do in C++ or Java:
myArray [][]
Basically, I want to do the following in Python:
myArray[0][1] = list1
myArray[1][2] = list2
myArray[2][3] = list3
How to do this, gurus?
--- Michael Spencer [EMAIL
Michael Spencer wrote:
Anthony Liu wrote:
I cannot figure out how to specify a list of a
particular size.
For example, I want to construct a list of size 10,
how do I do this?
A list does not have a fixed size (as you probably know)
But you can initialize it with 10 somethings
[None]*10
In [EMAIL PROTECTED], Klaus Neuner wrote:
In order to avoid problems in the future, I tried to get the list of
all those names, but I could not find it.
Typing ``dir(__builtins__)`` in the interpreter was already mentioned.
Next advice is: make sure all those names are highlighted in your
They tell me the error is Recv Timed Out.
--
http://mail.python.org/mailman/listinfo/python-list
Anthony Liu wrote:
Yes, that's helpful. Thanks a lot.
But what if I wanna construct an array of arrays like
we do in C++ or Java:
myArray [][]
Basically, I want to do the following in Python:
myArray[0][1] = list1
myArray[1][2] = list2
myArray[2][3] = list3
How to do this, gurus?
You might be
brian wrote:
They tell me the error is Recv Timed Out.
It would probably go much faster if they were the
ones asking the questions and describing their
situation.
Otherwise it sounds like a case of the blind leading the blind.
You don't know the specifics of their situation, and
troubleshooting is
Kent Johnson wrote:
André Søreng wrote:
Hi!
Given a string, I want to find all ocurrences of
certain predefined words in that string. Problem is, the list of
words that should be detected can be in the order of thousands.
With the re module, this can be solved something like this:
import re
r =
There are many ways, for instance you could use SimpleXMLRPCServer and
have one app expose a done_process() function, and use that to
synchronize.
--
http://mail.python.org/mailman/listinfo/python-list
Chris wrote:
Is there a preferred method for having different scripts on different
computers communicate with each other?
For example, script A could tell script B that it is done with a certain
process.
I know how to do this using e-mail, but I would like a more direct
method if possible. If
Am Dienstag, 1. März 2005 21:53 schrieb brian:
They tell me the error is Recv Timed Out.
This sounds like a socket level (TCP/IP stack) error, which might be caused by
a malfunctioning gateway or network device (likely), an error in the
operating system or network device driver they use
I totally agreebut that being said...I want to make sure its not
something on my server causing the problem. Im on a windows 2003
server.
Let me also throw this into the mixbefore we went down the HTTP
post route we first tried to post data directly into MSSQL, but we were
getting
Chris wrote:
Is there a preferred method for having different scripts on different
computers communicate with each other?
For example, script A could tell script B that it is done with a certain
process.
I know how to do this using e-mail, but I would like a more direct
method if possible. If
Am Dienstag, 1. März 2005 21:54 schrieb Chris:
Is there a preferred method for having different scripts on different
computers communicate with each other?
You have several options at your disposal.
1) Use mail-communication (like you said, a combination of smtplib and
poplib/imaplib),
2)
On Tue, 01 Mar 2005 22:04:15 +0100, André Søreng [EMAIL PROTECTED] wrote:
Kent Johnson wrote:
André Søreng wrote:
Hi!
Given a string, I want to find all ocurrences of
certain predefined words in that string. Problem is, the list of
words that should be detected can be in the order
I'm still very new to python (my 2nd day atm) but this is what I come
up with.
First note, I wasn't clear (I reread what I wrote) about my 'word'
'wordtwo' problem. Both words do Not need to be on the same line. But
rather say there was
Line 4: This is a line
Line 5: Yet another one
Line 6: its
Steven Bethard steven.bethard at gmail.com writes:
P.S. If you haven't already, you should read
http://users.rcn.com/python/download/Descriptor.htm a couple of times.
It took me until about the third time I read it to really understand
what descriptors were doing. The big thing to
Good day
I'm trying to figure out if there's a way to gather the computer's specs. At
the end it will be scripted into Blender.
Does Python have such direct hardware access methods that would be platform
indepandant?
Thanks
Nicky
--
http://mail.python.org/mailman/listinfo/python-list
André Søreng wrote:
Hi!
Given a string, I want to find all ocurrences of
certain predefined words in that string. Problem is, the list of
words that should be detected can be in the order of thousands.
With the re module, this can be solved something like this:
import re
r =
When you say tools, can you give me one in particular that I can
install on my server to do what you were mentioning?
--
http://mail.python.org/mailman/listinfo/python-list
Douglas Alan [EMAIL PROTECTED] wrote:
While writing a generator, I was just thinking how Python needs a
yield_all statement. With the help of Google, I found a
pre-existing discussion on this from a while back in the Lightweight
Languages mailing list. I'll repost it here in order to improve
I found out that doing a re.findall will split up the results into an
array, or rather something called a list (looks like an array to me).
I'd be set if i could just count the elements in the array but I can't
seem to find anything in the documentation on how to : / ...
--
Hi,
Le mardi 1 Mars 2005 22:15, [EMAIL PROTECTED] a écrit :
Now I don't know this stuff very well but I dont think the code
[line for line in document if (line.find('word') != -1 \
and line.find('wordtwo') != -1)]
would do this as it answers the question in how you thought I
Hi,
No, this won't do. What is needed is a way to yield the results of a generator
from inside another generator with having to do a for-yield-loop inside the
outter generator.
Regards,
Francis Girard
Le mardi 1 Mars 2005 22:35, Adam Przybyla a crit:
... mayby that way:
ython 2.2.3 (#1,
Why Microsoft and Windows ?
B/c it was actually in the data I was trying to parse (though not
something I was needing to parse), I obscured everything except my test
search terms *shrugs*
I saw something on this group about 'to many or's' so I figured it
was an option. Thanks for the
Oops. I meant without having instead of with having which is a syntax
error.
Regards
Le mardi 1 Mars 2005 22:53, Francis Girard a crit:
No, this won't do. What is needed is a way to yield the results of a
generator from inside another generator with having to do a for-yield-loop
inside the
David S. wrote:
Steven Bethard steven.bethard at gmail.com writes:
David S. wrote:
I am looking for a way to implement the same simple validation on many
instance attributes and I thought descriptors
(http://users.rcn.com/python/download/Descriptor.htm) looked like the
right tool.
Looks like
Grant Edwards wrote:
On 2005-03-01, Steve Horsley [EMAIL PROTECTED] wrote:
t1 = threading.Thread(target=fiddle())
t2 = threading.Thread(target=fiddle())
t1 = threading.Thread(target=fiddle)
t2 = threading.Thread(target=fiddle)
Doh! Slap that forehead!
Of course, I was calling fiddle() and
Jarek Zgoda wrote:
Przemysaw Rycki napisa(a):
- Is there any 'upper boundary' that limits the number of threads? (is
it python / OS related)
- Is that the sign of 'clumsy programming' - i.e. Is creating so many
threads a bad habit? (I must say that it simplified the solution of my
problem very
In article [EMAIL PROTECTED],
=?ISO-8859-2?Q?Przemys=B3aw_R=F3=BFycki?=
[EMAIL PROTECTED] wrote:
I have written some code, which creates many threads for each connection
('main connection'). The purpose of this code is to balance the load
between several connections ('pipes'). The number of
Francis Girard [EMAIL PROTECTED] writes:
Therefore, the suggestion you make, or something similar, would have
actually ease my learning, at least for me.
Yes, I agree 100%. Not having something like yield_all hurt my
ability to learn to use Python's generators quickly because I figured
that
David Eppstein [EMAIL PROTECTED] writes:
In article [EMAIL PROTECTED],
Douglas Alan [EMAIL PROTECTED] wrote:
Cetainly, if yield_all
iterator == for i in iterator: yield i, I don't see how anything
is gained except for a few keystrokes.
What's gained is making one's code more readable
[EMAIL PROTECTED] wrote:
I found out that doing a re.findall will split up the results into an
array, or rather something called a list (looks like an array to me).
I'd be set if i could just count the elements in the array but I
can't
seem to find anything in the documentation on how to : /
[EMAIL PROTECTED] wrote:
I found out that doing a re.findall will split up the results into an
array, or rather something called a list (looks like an array to me).
I'd be set if i could just count the elements in the array but I can't
seem to find anything in the documentation on how to : / ...
dir(*) !!! That's beautiful! I was just wanting to know what was
available to an object. I was thinking, if there was just something
that quickly told me that info I could look through the documentation
quicker :D
I found the len(*) obscurely mentioned on someones webpage. Thanks for
the dir(*)
Hello
I have written a program that interacts with a
command line program.
Roughly speaking, it mimics human interaction.
(With more speed and accuracy, less intelligence.)
It works fine under Linux, using select().
But Windows does not support select for files.
Only for sockets.
Here's a google
Douglas Alan wrote:
David Eppstein [EMAIL PROTECTED] writes:
In article [EMAIL PROTECTED],
Douglas Alan [EMAIL PROTECTED] wrote:
Cetainly, if yield_all
iterator == for i in iterator: yield i, I don't see how anything
is gained except for a few keystrokes.
What's gained is making one's code
mx2k wrote:
Hello @ all,
we have written a small program (code below) for our own
in-developement rpg system, which is getting values for 4
RPG-Characters and doing some calculations with it.
now we're trying hard to find out how to get it working with 'n'
Characters, so you will be asked to enter
Your welcome for the help , be sure to pass it on ;)
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
NEED QUICK EASY CASH???
Turn $6.00 into $60,000...read this to find out how!!!
READING THIS COULD CHANGE YOUR LIFE!!!
I found this on a bulletin board like this one and decided to try it. A
little while back, I was
browsing through a newsgroup, just like you are now, and came across an
article
On Tue, 1 Mar 2005 09:45:26 -0600, Skip Montanaro [EMAIL PROTECTED]
wrote:
1) Validate that the password is correct for that user *without
actually logging in*.
Kanenas The 'pwd' module probably won't be able (and won't try) to read
Kanenas the shadow password file, so
Steve Holden wrote:
Now, the reason for this specific rant is this: I can tell a cry for
help when I see one. Brett has done a magnificent job of providing
python-dev summaries since Andrew decided he'd had enough, and he is to
be congratulated for it. I managed to offload another bunch of work
Tim Roberts wrote:
Are inodes supported on Windows NTFS, FAT, FAT32?
No. Inodes are strictly a Unix filesystem concept.
I disagree. NTFS MFT records are so similar to inodes
that their numbers could well be used in st_ino (except
that they are 64-bit quantities, whereas st_ino
typically has only
- Original Message -
From: "André Søreng" [EMAIL PROTECTED]
Newsgroups: comp.lang.python
To: python-list@python.org
Sent: Tuesday, March 01, 2005 8:46 PM
Subject: Regular Expressions: large amount of or's
Hi! Given a string, I want to find all
ocurrences of certain predefined
Hi !
A socket (TCP) server is very easy, and 30 x faster than XML-RPC.
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
Hi !
A socket (TCP) server is more simplist than XML-RPC, and 30 x faster.
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
In article [EMAIL PROTECTED],
Steve Holden [EMAIL PROTECTED] wrote:
.
.
.
I've read somewhere (I cann't recall where, though, was it MSDN?) that
Windows is not well suited to run more than 32 threads per process. Most
of
Jonathan Fine [EMAIL PROTECTED] writes:
My question is this: Under Windows, is it possible
to read as many bytes as are available from stdout,
without blocking?
I think Windows implements non-blocking i/o calls. However the
traditional (to some) Python or Java approach to this problem is
to
Steve Holden [EMAIL PROTECTED] writes:
Guido has generally observed a parsimony about the introduction of
features such as the one you suggest into Python, and in particular
he is reluctant to add new keywords - even in cases like decorators
that cried out for a keyword rather than the ugly @
SOFTWARE DEVELOPER
Responsibilities:
You will be a key member of a project team to develop and deliver core
modules of a breakthrough product in a venture capital backed start-up
company. You will be responsible for defining, designing and
implementing
complex software and participate in the
[EMAIL PROTECTED] wrote:
I found out that doing a re.findall will split up the results into an
array, or rather something called a list (looks like an array to me).
It may look like an array to you, but it's a list. Python
doesn't have arrays, unless you count something like the
numarray/Numeric
Do Re Mi chel La Si Do wrote:
A socket (TCP) server is more simplist than XML-RPC, and 30 x faster.
Is it more simplist in terms of reliability? Generally
most people writing low-level socket code, even in Python,
do an absymal job of it. Far better to avoid reinventing
the wheel and use
Nicky Kotze wrote:
I'm trying to figure out if there's a way to gather the computer's specs. At
the end it will be scripted into Blender.
Does Python have such direct hardware access methods that would be platform
indepandant?
Define specs. Specifically, please. :-)
Python has access to some
This can be interesting:
http://science.slashdot.org/science/05/03/01/2340238.shtml
Bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Douglas Alan wrote:
In this case, that is great, since I'd much prefer
yield *gen1(arg)
than
yield_all gen1(arg)
I'm guessing the * syntax is pretty unlikely to win Guido's approval.
There have been a number of requests[1][2][3] for syntax like:
x, y, *rest = iterable
for unpacking a
John Machin [EMAIL PROTECTED] writes:
In Python,
longString + is longString
evaluates to True. I don't know how you can do nothing more
gracefully than that.
And also + longString is longString
The string + operator provides those graceful *external* results by
ugly special-case
Cameron Laird wrote:
Also, has anyone indexed Python bloggers (that is, webloggers
of things Pythonic)?
Certainly.
http://mechanicalcat.net/pyblagg.html
http://planetpython.org/
--
Robert Kern
[EMAIL PROTECTED]
In the fields of hell where the grass grows high
Are the graves of dreams allowed to
Steven Bethard [EMAIL PROTECTED] writes:
I'm guessing the * syntax is pretty unlikely to win Guido's
approval. There have been a number of requests[1][2][3] for syntax
like:
x, y, *rest = iterable
Oh, it is so wrong that Guido objects to the above. Python needs
fully destructuring
[Nick Coghlan]
Hmm, it might be nice if there was a UserList.ListMixin that was the
counterpart to UserDict.DictMixin
[Steven Bethard]
I've thought this occasionally too. One of the tricky issues though is
that often you'd like to define __getitem__ for single items and have
ListMixin
Excellent point Warren. I have been working with Python for about 3
years in all, but only really seriously for about a year. I am still
utterly amazed that near everything that takes me about 5 to 20 lines
of code can be done in 1, 2 or 3 lines of Python code (when done
correctly). It is very
Harlin Seritt wrote:
Roy, I like what you showed: nums = [a for a in range(100)] . My
mistake for not expressing my question as well as I should have. Not
only am I looking for a way to fill in 100 spots (more or less) in an
array er... list, but I'd like to be able to do it in intervals of
2,
You can add this:
button = Button(top, text=Close Me, command=top.destroy)
button.pack()
That will kill the Toplevel window.
Cheers,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
I am trying to write simple recursive function to build a list:
def rec(n,alist=[]):
_nl=alist[:]
print n,_nl
if n == 0:
print n,_nl
return _nl
else:
_nl=_nl+[n]
rec(n-1,_nl)
_nl=[]
_nl=rec(4)
print _nl
### shouldn't this work?
_nl=rec(4)
The output
In article [EMAIL PROTECTED],
actuary77 [EMAIL PROTECTED] wrote:
I am trying to write simple recursive function to build a list:
def rec(n,alist=[]):
_nl=alist[:]
print n,_nl
if n == 0:
print n,_nl
return _nl
else:
_nl=_nl+[n]
101 - 200 of 232 matches
Mail list logo