On 2011-01-18, geremy condra debat...@gmail.com wrote:
On Mon, Jan 17, 2011 at 4:02 PM, Tim Harig user...@ilthio.net wrote:
I really question that you get Java anywhere even close to C performance.
Google reports they get within the same order of magnitude as C for
their long-lived server
On Tue, Jan 18, 2011 at 11:05 AM, Tim Harig user...@ilthio.net wrote:
Even assuming that PyPy does actually manage to reach within a magnitude
of C with the extra effort required to leverage two languages, why
would I bother when I can do it with one? PyPy and similar methods
where great when
On 2011-01-18, Terry Reedy tjre...@udel.edu wrote:
On 1/18/2011 10:30 AM, Tim Harig wrote:
Whether or not you actually agree with that economic reality is
irrelevant. Those who fund commerical projects do; and, any developement
tool which violates the security of the source is going to find
Python for
what it does well and cleanly. For the rest, there are now better tools.
Once again, its about the right tool for the right job.
Again, you don't know what you're talking about WRT PyPy.
Nor do I really want to. I have found a much simpler solution
to the problem. I would recommend
Cobra seems to similar to python. Or it at least compares itself to python.
--
http://mail.python.org/mailman/listinfo/python-list
Anyone have thoughts on Cobra?
On Jan 18, 2011 4:20 PM, Zach taylo...@gmail.com wrote:
Cobra seems to similar to python. Or it at least compares itself to
python.
--
http://mail.python.org/mailman/listinfo/python-list
From: Tim Harig user...@ilthio.net
On 2011-01-18, Terry Reedy tjre...@udel.edu wrote:
On 1/18/2011 10:30 AM, Tim Harig wrote:
Whether or not you actually agree with that economic reality is
irrelevant. Those who fund commerical projects do; and, any
developement
tool which violates the
On 2011-01-16, geremy condra debat...@gmail.com wrote:
On Sun, Jan 16, 2011 at 3:03 AM, Tim Harig user...@ilthio.net wrote:
On 2011-01-16, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
If the author thinks that Go is a tried and true (his words, not mine)
language where
On Mon, 17 Jan 2011 09:12:04 +, Tim Harig wrote:
Python has been widely used by people like us that happen to like the
language and found ways to use it in our workplaces; but, most of the
time it is an unofficial use that the company. You still don't see many
companies doing large scale
On Mon, Jan 17, 2011 at 1:12 AM, Tim Harig user...@ilthio.net wrote:
On 2011-01-16, geremy condra debat...@gmail.com wrote:
On Sun, Jan 16, 2011 at 3:03 AM, Tim Harig user...@ilthio.net wrote:
snip
Personally, I think the time is ripe for a language that bridges the
gap between ease of use
On 2011-01-17, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
On Mon, 17 Jan 2011 09:12:04 +, Tim Harig wrote:
Python has been widely used by people like us that happen to like the
language and found ways to use it in our workplaces; but, most of the
time it is an unofficial
On 2011-01-17, Chris Rebert c...@rebertia.com wrote:
On Mon, Jan 17, 2011 at 1:12 AM, Tim Harig user...@ilthio.net wrote:
On 2011-01-16, geremy condra debat...@gmail.com wrote:
On Sun, Jan 16, 2011 at 3:03 AM, Tim Harig user...@ilthio.net wrote:
snip
Personally, I think the time is ripe for a
Tim Harig, 17.01.2011 13:25:
If I didn't think Python was a good language, I wouldn't be here.
Nevertheless, it isn't a good fit for many pieces of software where a
systems language is better suited. Reasons include ease of distribution
without an interpeter, non-necessity of distributing
On Mon, Jan 17, 2011 at 1:12 AM, Tim Harig user...@ilthio.net wrote:
On 2011-01-16, geremy condra debat...@gmail.com wrote:
On Sun, Jan 16, 2011 at 3:03 AM, Tim Harig user...@ilthio.net wrote:
On 2011-01-16, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
If the author thinks that
In comp.lang.python, you wrote:
Tim Harig, 17.01.2011 13:25:
If I didn't think Python was a good language, I wouldn't be here.
Nevertheless, it isn't a good fit for many pieces of software where a
systems language is better suited. Reasons include ease of distribution
without an interpeter,
On 2011-01-17, geremy condra debat...@gmail.com wrote:
On Mon, Jan 17, 2011 at 1:12 AM, Tim Harig user...@ilthio.net wrote:
On 2011-01-16, geremy condra debat...@gmail.com wrote:
I wouldn't say Go is narrowly targeted. It's a systems language that can
compete in the same domain with scripting
On Mon, Jan 17, 2011 at 1:07 PM, Tim Harig user...@ilthio.net wrote:
On 2011-01-17, geremy condra debat...@gmail.com wrote:
On Mon, Jan 17, 2011 at 1:12 AM, Tim Harig user...@ilthio.net wrote:
On 2011-01-16, geremy condra debat...@gmail.com wrote:
I wouldn't say Go is narrowly targeted. It's
On 2011-01-17, geremy condra debat...@gmail.com wrote:
On Mon, Jan 17, 2011 at 1:07 PM, Tim Harig user...@ilthio.net wrote:
On 2011-01-17, geremy condra debat...@gmail.com wrote:
On Mon, Jan 17, 2011 at 1:12 AM, Tim Harig user...@ilthio.net wrote:
On 2011-01-16, geremy condra
On Mon, 17 Jan 2011 19:41:54 +, Tim Harig wrote:
One of the arguments for Python has always made is that you can optimize
it by writing the most important parts in C. Perhaps that is a crutch
that has held the communty back from seeking higher performance
solutions in the language
Tim Harig, 17.01.2011 20:41:
In comp.lang.python, I wrote:
Tim Harig, 17.01.2011 13:25:
If I didn't think Python was a good language, I wouldn't be here.
Nevertheless, it isn't a good fit for many pieces of software where a
systems language is better suited. Reasons include ease of
On 2011-01-16, John Nagle na...@animats.com wrote:
On 1/15/2011 10:48 PM, Aman wrote:
@nagle Means you are suggesting me not to proceed with Python because I've
had experience with C++?
No, Python is quite useful, but on the slow side. If you're I/O
bound, not time critical, or
Tim Harig user...@ilthio.net writes:
Those who are concerned about performance should check out Go.
Garbage collection, duck typing, and compiles to a native binary.
It creates a great middle ground between C++ and Python. Any C and/or
Python programmer will feel right at home with the
John Nagle, 16.01.2011 07:03:
Threading is supported
but thread concurrency is marginal. The most common implementation is
a naive interpreter with reference counting backed up by a mark
and sweep garbage collector. Performance is about 1/60 of
optimized C code.
That's Python.
Since the OP is
On 2011-01-16, Paul Rubin no.email@nospam.invalid wrote:
Tim Harig user...@ilthio.net writes:
Those who are concerned about performance should check out Go.
Garbage collection, duck typing, and compiles to a native binary.
It creates a great middle ground between C++ and Python. Any C and/or
On Sun, 16 Jan 2011 09:47:35 +, Tim Harig wrote:
One of the things that gives me hope
for Go is that it is backed by Google so I expect that it may gain some
rather rapid adoption. It has made enough of a wake to grab one of
Eweek's 18 top languages for 2011.
If the author thinks that
On 2011-01-16, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
On Sun, 16 Jan 2011 09:47:35 +, Tim Harig wrote:
One of the things that gives me hope
for Go is that it is backed by Google so I expect that it may gain some
rather rapid adoption. It has made enough of a wake to
On Sunday 16 January 2011 08:35, geremy condra wrote:
On Sat, Jan 15, 2011 at 9:30 PM, Aman aman.6...@gmail.com wrote:
It would be great if you people could guide me as to what to proceed with
and how.
Here's what I would do:
[Snip advice]
Maybe it would be good to expand the Getting
On Jan 16, 5:03 am, Tim Harig user...@ilthio.net wrote:
Personally, I think the time is ripe for a language that bridges the
gap between ease of use dynamic languages with the performance and
distribution capabilities of a full systems level language.
Bravo!
This is after
all the promise
On Sun, Jan 16, 2011 at 3:03 AM, Tim Harig user...@ilthio.net wrote:
On 2011-01-16, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
If the author thinks that Go is a tried and true (his words, not mine)
language where programmers can go to look for work, I think he's
fooling
Hey all, I am a college student, and at college, we did most of the work in
C/C++. I kind of stopped using C when I learned C++ (simply because C++ seemed
a natural/elegant choice to me, and had backward compatibility with C). I've
had a lot of experience with C++.
Recently, I was on the path
On 1/15/2011 9:30 PM, Aman wrote:
Hey all, I am a college student, and at college, we did most of the
work in C/C++. I kind of stopped using C when I learned C++ (simply
because C++ seemed a natural/elegant choice to me, and had backward
compatibility with C). I've had a lot of experience with
@nagle Means you are suggesting me not to proceed with Python because I've had
experience with C++?
--
http://mail.python.org/mailman/listinfo/python-list
On 1/15/2011 10:48 PM, Aman wrote:
@nagle Means you are suggesting me not to proceed with Python because I've had
experience with C++?
No, Python is quite useful, but on the slow side. If you're I/O
bound, not time critical, or otherwise not performance constrained,
it's quite useful. The
On Sat, Jan 15, 2011 at 9:30 PM, Aman aman.6...@gmail.com wrote:
Hey all, I am a college student, and at college, we did most of the work in
C/C++. I kind of stopped using C when I learned C++ (simply because C++
seemed a natural/elegant choice to me, and had backward compatibility with
C).
I did not understand completely what you want, and rereading previous posts
I got even more confused...
Could you provide a complete description of what you want to do?
Is it a single process, or two separate processes? Running on the same
machine or remotely? All python or there is another
Hello again,
I wanted to give your solution a try, but got stuck.
The file that I want to replace the standard input with is a pseudo file
object with a custom read method. I have a hard time finding out how
to have a file descriptor (or fileno) associated with it.
I tried inheriting from the
En Wed, 01 Oct 2008 14:48:52 -0300, Almar Klein [EMAIL PROTECTED]
escribió:
I wanted to give your solution a try, but got stuck.
The file that I want to replace the standard input with is a pseudo
file
object with a custom read method. I have a hard time finding out how
to have a file
Wow,
it's that easy...
thanks!
2008/9/29 Gabriel Genellina [EMAIL PROTECTED]
En Fri, 26 Sep 2008 04:29:42 -0300, Almar Klein [EMAIL PROTECTED]
escribió:
I would still like to hear if anyone knows how I can change the input
stream
that
is used when running python -i, but I would not be
En Fri, 26 Sep 2008 04:29:42 -0300, Almar Klein [EMAIL PROTECTED]
escribió:
I would still like to hear if anyone knows how I can change the input
stream
that
is used when running python -i, but I would not be surprised if it is
impossible...
Sure you can. You have to replace the file
Use subprocess.PIPE
Usually the tricky part is to figure out exactly whether there is more
input or not. With Python it's easy, use the ps1 prompt.
Thanks, but that is not exactly what I meant. (Maybe my question was
a bit vague). I want to replace the input stream of the *remote* process.
Hi,
I want to start python -i from a subprocess and change its stdin stream,
so I get control over the commands I feed the interpreter.
I thought just changing sys.stdin to my custom file-like object would
suffice, but this does not work. Neither does changing sys.__stdin__.
I guess the
En Thu, 25 Sep 2008 09:49:31 -0300, Almar Klein [EMAIL PROTECTED]
escribió:
Hi,
I want to start python -i from a subprocess and change its stdin
stream,
so I get control over the commands I feed the interpreter.
I thought just changing sys.stdin to my custom file-like object would
[EMAIL PROTECTED] wrote:
I realize in the new style, getattr and setattr are supposed to
reference something in a base class, but here is what I'm trying to
do:
class tryit:
def __init__(self, a, b):
self.__dict__[a] = a
self.__dict__[b] = b
def __dir__(self):
I realize in the new style, getattr and setattr are supposed to
reference something in a base class, but here is what I'm trying to
do:
class tryit:
def __init__(self, a, b):
self.__dict__[a] = a
self.__dict__[b] = b
def __dir__(self):
return [ geta, getb ]
def
rzed wrote:
Cope [EMAIL PROTECTED] wrote in news:7ab5b781-3c6c-
[EMAIL PROTECTED]:
please tell me what is python.This group is so crowded.
I see nobody has chosen to answer your question seriously. I'll
give you an answer, but it is probably not to the question you are
asking, either.
You're having a conversation with a spambot.
Spam - certainly. But bot - no. Unless there have been some really
remarkable improvements in KI lately.
It's amazing that recently so many spam is written by some guys actually
_reading_ this group. I presume they somehow want to create credibility
Diez B. Roggisch wrote:
It's amazing that recently so many spam is written by some guys actually
_reading_ this group. I presume they somehow want to create credibility in
their postings by provoking real threads that then at some point contain
the actual information.
I wonder why this
really
have the same view of what Python actually is? Or what it could
be?
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
Cope wrote:
within 10 months over 1 mn joined the network. everything available on
its viewbar. But it can be download only onXP and Vista for security.
Cope
www.spam.spam/spam/SPAM
www.spam-spam.spam
See, Diez was right.
/W
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 19, 6:40 pm, Wildemar Wildenburger
[EMAIL PROTECTED] wrote:
Cope wrote:
within 10 months over 1 mn joined the network. everything available on
its viewbar. But it can be download only onXP and Vista for security.
Cope
www.spam.spam/spam/SPAM
www.spam-spam.spam
See, Diez was
Cope [EMAIL PROTECTED] wrote in news:7ab5b781-3c6c-
[EMAIL PROTECTED]:
please tell me what is python.This group is so crowded.
I see nobody has chosen to answer your question seriously. I'll
give you an answer, but it is probably not to the question you are
asking, either.
Python is not
Damn! I joined this group because I thought it was a pie-a-thon. All
that practice has now gone to waste/waist.
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 19, 4:42 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Sun, 18 Nov 2007 14:37:08 -0800 (PST), Zentrader
[EMAIL PROTECTED] declaimed the following in comp.lang.python:
Damn! I joined this group because I thought it was a pie-a-thon. All
that practice has now gone to waste/waist.
On Nov 18, 8:41 pm, rzed [EMAIL PROTECTED] wrote:
Cope [EMAIL PROTECTED] wrote in news:7ab5b781-3c6c-
[EMAIL PROTECTED]:
please tell me what is python.This group is so crowded.
I see nobody has chosen to answer your question seriously. I'll
give you an answer, but it is probably not to the
On 11/17/07, Cope [EMAIL PROTECTED] wrote:
In our place we eat pythons for curry. Its delicious.
And how about your python?
Cope
Not much of the difference here, it is just a bit more flexible. My
python goes and brings me whatever I wish to eat.
Cheers,
--
--
Amit Khemka
--
On Nov 17, 12:14 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
On Nov 16, 3:10�pm, Alan [EMAIL PROTECTED] wrote:
On Nov 16, 8:29 pm, [EMAIL PROTECTED] wrote:
I still don't get it and I've been haunting this group for months...
Mike
Go on then �...
What ?
The punchline, do the
On Nov 17, 5:00 pm, Amit Khemka [EMAIL PROTECTED] wrote:
On 11/17/07, Cope [EMAIL PROTECTED] wrote:
In our place we eat pythons for curry. Its delicious.
And how about your python?
Cope
Not much of the difference here, it is just a bit more flexible. My
python goes and brings me
On Saturday 17 November 2007 01:32:52 pm Cope wrote:
On Nov 17, 5:00 pm, Amit Khemka [EMAIL PROTECTED] wrote:
On 11/17/07, Cope [EMAIL PROTECTED] wrote:
In our place we eat pythons for curry. Its delicious.
And how about your python?
Cope
Not much of the difference here, it is
On 2007-11-17, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
On Nov 16, 3:10?pm, Alan [EMAIL PROTECTED] wrote:
On Nov 16, 8:29 pm, [EMAIL PROTECTED] wrote:
I still don't get it and I've been haunting this group for months...
Mike
Go on then ?...
What ?
The punchline, do the punchline
On Nov 17, 10:00�am, Neil Cerutti [EMAIL PROTECTED] wrote:
On 2007-11-17, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
On Nov 16, 3:10?pm, Alan [EMAIL PROTECTED] wrote:
On Nov 16, 8:29 pm, [EMAIL PROTECTED] wrote:
I still don't get it and I've been haunting this group for months...
On Nov 17, 12:19 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
On Nov 17, 10:00�am, Neil Cerutti [EMAIL PROTECTED] wrote:
On 2007-11-17, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
On Nov 16, 3:10?pm, Alan [EMAIL PROTECTED] wrote:
On Nov 16, 8:29 pm, [EMAIL PROTECTED] wrote:
I
* Cope (Fri, 16 Nov 2007 06:09:31 -0800 (PST))
please tell me what is python.This group is so crowded.
A Python is dangerous snake[1]. This group here mainly consists of
misguided snake worshippers. You'd better run before they come to your
place...
Thorsten
[1]
please tell me what is python.This group is so crowded.
Khup
http://groups.google.com/group/download-centre
--
http://mail.python.org/mailman/listinfo/python-list
However, the python is not poisonous, so it is also edible if you can kill
one before it squeezes you to death. Despite this fact, it is not a major
food source for group members, due to our great respect for the mighty
python.
Shawn
On Nov 16, 2007 9:14 AM, Thorsten Kampe [EMAIL PROTECTED]
On Nov 16, 8:14 am, Thorsten Kampe [EMAIL PROTECTED] wrote:
* Cope (Fri, 16 Nov 2007 06:09:31 -0800 (PST))
please tell me what is python.This group is so crowded.
A Python is dangerous snake[1]. This group here mainly consists of
misguided snake worshippers. You'd better run before they
On Nov 16, 1:16 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
On Nov 16, 8:14 am, Thorsten Kampe [EMAIL PROTECTED] wrote:
* Cope (Fri, 16 Nov 2007 06:09:31 -0800 (PST))
please tell me what is python.This group is so crowded.
A Python is dangerous snake[1]. This group here mainly
On Nov 16, 8:29 pm, [EMAIL PROTECTED] wrote:
I still don't get it and I've been haunting this group for months...
Mike
Go on then ...
What ?
The punchline, do the punchline
--
Alan
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 16, 2007 2:16 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
On Nov 16, 8:14 am, Thorsten Kampe [EMAIL PROTECTED] wrote:
* Cope (Fri, 16 Nov 2007 06:09:31 -0800 (PST))
please tell me what is python.This group is so crowded.
A Python is dangerous snake[1]. This group here mainly
: Thorsten Kampe thorste...enkampe.de wrote:
* Cope (Fri, 16 Nov 2007 06:09:31 -0800 (PST))
please tell me what is python.This group is so crowded.
A Python is dangerous snake[1]. This group here mainly consists of
misguided snake worshippers. You'd better run before they come to your
On Nov 16, 3:10�pm, Alan [EMAIL PROTECTED] wrote:
On Nov 16, 8:29 pm, [EMAIL PROTECTED] wrote:
I still don't get it and I've been haunting this group for months...
Mike
Go on then �...
What ?
The punchline, do the punchline
Punchline? I don't think there's a punchline
scheduled, is
kyoso..gmail.com(Mike) wrote:
On Nov 16, 1:16 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
On Nov 16, 8:14 am, Thorsten Kampe [EMAIL PROTECTED] wrote:
* Cope (Fri, 16 Nov 2007 06:09:31 -0800 (PST))
please tell me what is python.This group is so crowded.
A Python is dangerous
Hello,
Anyone using Leopard know which versions of Python and wxPython and
any other Python related modules are default with the new OS?
Thanks,
--
http://mail.python.org/mailman/listinfo/python-list
Python 2.5.1, and wxPython 2.8.4.0.
On 10/29/07, chewie54 [EMAIL PROTECTED] wrote:
Hello,
Anyone using Leopard know which versions of Python and wxPython and
any other Python related modules are default with the new OS?
Thanks,
--
http://mail.python.org/mailman/listinfo/python-list
--
Hi All,
Does anyone know what version of Python and wxPython comes with the
new Mac OS X Leopard?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
According to this Apple web page, Python 2.5 will be supported
http://www.apple.com/macosx/technology/unix.html
Horace
In article [EMAIL PROTECTED],
chewie54 [EMAIL PROTECTED] wrote:
Hi All,
Does anyone know what version of Python and wxPython comes with the
new Mac OS X Leopard
Thank you in advance,
Dmitrey
--
http://mail.python.org/mailman/listinfo/python-list
In [EMAIL PROTECTED], dmitrey wrote:
Thank you in advance,
For what? Hint: Don't hide the question in the subject line.
I don't know MATLAB's `persistent` but I know that ``static`` in C++ can
be used in different places with different meanings.
It seems you are asking questions how to
Marc 'BlackJack' Rintsch wrote:
In [EMAIL PROTECTED], dmitrey wrote:
Thank you in advance,
For what? Hint: Don't hide the question in the subject line.
I don't know MATLAB's `persistent` but I know that ``static`` in C++ can
be used in different places with different meanings.
It seems
On Mar 15, 8:09 am, dmitrey [EMAIL PROTECTED] wrote:
Thank you in advance,
Dmitrey
First, static can mean at least three different things in C++:
static int myvar1;
void foobar() {
static int myvar2;
}
class foobar {
static int myvar3;
}
I assume you are thinking about the second case
John Nagle [EMAIL PROTECTED] wrote:
Most of the examples given here are kind of silly, but closures have
real uses. I used one today in Javascript because I was writing an
AJAX application, and I was using an API, the standard XMLHttpRequestObject,
which required a callback function with
Paul Boddie wrote:
I know that everyone will say that Python is a multi-paradigm
language and that one should feel free to use whatever technique seems
appropriate to solve the problem at hand, but it seems to me that
there's been an explosion in nested function usage recently, with lots
of
John Nagle wrote:
Most of the examples given here are kind of silly, but closures have
real uses. I used one today in Javascript because I was writing an
AJAX application, and I was using an API, the standard XMLHttpRequestObject,
which required a callback function with no arguments. A
Paddy wrote:
I played around a bit. The following is a 'borg' version in that there
is only one counter shared between all calls of the outer function:
def fun_borg_var(initial_val=0):
...def borg_var_inc(x=1):
...fun_borg_var._n += x
a drawback with the function attribute
Karl Kofnarson wrote:
I wanted to have a function which would, depending on
some argument, return other functions all having access to
the same variable. An OO approach would do but why not
try out closures...
I know that everyone will say that Python is a multi-paradigm
language and that
Paul Boddie wrote:
I know that everyone will say that Python is a multi-paradigm
language and that one should feel free to use whatever technique seems
appropriate to solve the problem at hand, but it seems to me that
there's been an explosion in nested function usage recently, with lots
of
def foobar(arg1, arg2, arg3):
def helper(arg):
do something with arg1 and argument
def foo():
do something with arg1 and arg3 and
call helper
def bar():
do something with arg1 and arg2
def zoo():
Fredrik Lundh wrote:
when doing some heavy optimization, I recently found myself writing:
def foobar(arg1, arg2, arg3):
def helper(arg):
do something with arg1 and argument
def foo():
do something with arg1 and arg3 and
call
Paul Boddie wrote:
I'm not pointing the finger at you here, Karl, since you seem to be
experimenting with closures, but why are they suddenly so fashionable?
Haven't the features supporting them existed in Python for a few
versions now? Don't people want to write classes any more?
Intrigued,
Michele Simionato wrote:
I believe decorators are in large part responsible for that. A callable
object does not work
as a method unless you define a custom __get__, so in decorator
programming it is
often easier to use a closure. OTOH closures a not optimal if you want
persistency
(you
Karl Kofnarson wrote:
Karl,
Usually when using this idiom, fun_basket would return a tuple of all of the
defined functions, rather than one vs. the other. So in place of:
if f == 1:
return f1
if f == 2:
return f2
Just do
return f1, f2
(For that
Karl,
Usually when using this idiom, fun_basket would return a tuple of all of the
defined functions, rather than one vs. the other. So in place of:
if f == 1:
return f1
if f == 2:
return f2
Just do
return f1, f2
(For that matter, the argument f is no longer
Hi,
while writing my last program I came upon the problem
of accessing a common local variable by a bunch of
functions.
I wanted to have a function which would, depending on
some argument, return other functions all having access to
the same variable. An OO approach would do but why not
try out
On 12/1/06, Karl Kofnarson [EMAIL PROTECTED] wrote:
[snip]
def fun_basket(f):
common_var = [0]
def f1():
print common_var[0]
common_var[0]=1
def f2():
print common_var[0]
common_var[0]=2
if f == 1:
return f1
if f == 2:
Karl Kofnarson wrote:
Hi,
while writing my last program I came upon the problem
of accessing a common local variable by a bunch of
functions.
I wanted to have a function which would, depending on
some argument, return other functions all having access to
the same variable. An OO approach
Karl Kofnarson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi,
while writing my last program I came upon the problem
of accessing a common local variable by a bunch of
functions.
I wanted to have a function which would, depending on
some argument, return other functions all
Karl Kofnarson wrote:
Hi,
while writing my last program I came upon the problem
of accessing a common local variable by a bunch of
functions.
I wanted to have a function which would, depending on
some argument, return other functions all having access to
the same variable. An OO approach
Hi,
I have search it for quite a long time. But I still can't get it.
When I attempt to install yum and others, it always embarrasses me.
It says python(abi) = 2.4 is need.
I have version 2.4 at first. But have a try version 2.5, remove 2.4.
Both work well, and do well with wx.
OS: FC5
THX.
--
Mandy.Lialie wrote:
I have search it for quite a long time. But I still can't get it.
When I attempt to install yum and others, it always embarrasses me.
It says python(abi) = 2.4 is need.
afaik, python(api) is a psuedo-package that's used for dependency manage-
ment in Red Hat and Fedora
Hi,
I have searched for quite a long time, but still can't get it.
When I install YUM or others, it embarrasses me.
That says python(abi) = 2.4 is need.
Previous I install python 2.4, then install 2.5 to have a try.
Both work well. And build wxPython successfully with 2.5.
OS: FC5
Any help?
http://ars.userfriendly.org/cartoons/?id=20030225mode=classic
Just wondering...
--
http://mail.python.org/mailman/listinfo/python-list
101 - 200 of 236 matches
Mail list logo