[Paul Rubin]
I'd like to have a function (or other callable object) that returns
0, 1, 2, etc. on repeated calls. That is:
print f() # prints 0
print f() # prints 1
print f() # prints 2
# etc.
There should never be any possibility of any number getting returned
twice,
Diez B. Roggisch:
On second thoughts, a metaclass _might_ help here - but it would be
rather
elaborate: look in the baseclasses for properties that have getters
and
setters of the same name as some methods in the current class, and
replace
them, or create a new property with them (I'm not
Paul I'd like to have a function (or other callable object) that
Paul returns 0, 1, 2, etc. on repeated calls.
...
Paul There should never be any possibility of any number getting
Paul returned twice, or getting skipped over, even if f is being called
Paul from multiple
Tim Peters [EMAIL PROTECTED] writes:
The GIL is your friend here:
import itertools
f = itertools.count().next
Thanks, I was hoping something like this would work but was not sure I
could rely on it.
A similar thing can be done with xrange. But either way sucks if you
call it
Aahz wrote:
In article [EMAIL PROTECTED],
=?iso-8859-1?Q?Fran=E7ois?= Pinard [EMAIL PROTECTED] wrote:
[Sunnan]
[...] for Pythons ideal of having one canonical, explicit way to
program.
No doubt it once was true, but I guess this ideal has been abandoned a
few years ago.
My honest feeling is that
alex goldman wrote:
Daniel Silva wrote:
At any rate, FOLD must fold.
I personally think GOTO was unduly criticized by Dijkstra. With the benefit
of hindsight, we can see that giving up GOTO in favor of other primitives
failed to solve the decades-old software crisis.
What software crisis? Knuth
Paul Rubin http wrote:
Antoon Pardon [EMAIL PROTECTED] writes:
I'm not sure that this would be an acceptable approach. I did the man
semop and it indicates this is part of system V IPC. This makes me
fear that semaphores will use file descriptors or other resources
that are only
F. Petitjean wrote:
[...]
*I* wrote the original post. and am pretty sure it is not faked. And I
run it before posting to be sure not to say anything wrong. it is a kind
of relief to learn that computers in 2005 (even Python powered) are
humor-impaired and follow the « ref manual » every time
Mike Moum wrote:
Hi,
I'm a civil engineer who also doubles as chief programmer for technical
applications at my company. Most of our software is written in Visual
Basic because our VP in charge of I.T. likes to have consistency, and
at the moment we're a Microsoft shop. He has assigned me the
This is spectacular! :)
Is there a way to make it to work from environments (such as emacs)
where stdin is special?
Michele Simionato
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] writes:
Every user of thsi big directory works on big studies regarding oil
fields. Knowing the amount of data (and number of files) we have to
deal with (produced by simulators, visualization tools, and so on)
and knowing that users are usually lazy in doing clean up of
Nick Craig-Wood [EMAIL PROTECTED] writes:
I believe futex is the thing you want for a modern linux. Not
very portable though.
That's really cool, but I don't see how it can be a pure userspace
operation if the futex has a timeout. The kernel must need to keep
track of the timeouts. However,
Skip Montanaro wrote:
Paul I'd like to have a function (or other callable object) that
Paul returns 0, 1, 2, etc. on repeated calls.
...
Paul There should never be any possibility of any number getting
Paul returned twice, or getting skipped over, even if f is being called
Steve Holden [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
[Discussion on Python slices and the off-by-one issue
deleted]
While this may be an interesting philosophical (or should that be
philological) discussion, since Python has worked this way for donkey's
years, and
Dave Opstad wrote:
Is it just an implementation limitation that attributes cannot be
assigned to instances of internal types?
No, not just. Some types have a fixed set of attributes by design,
whereas others allow addition of attributes. There are several reasons
for this design. Performance is
Bugs item #1174712, was opened at 2005-04-01 09:22
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1174712group_id=5470
Category: Python Interpreter Core
Group: None
Status: Open
Bugs item #1174606, was opened at 2005-04-01 04:48
Message generated for change (Comment added) made by arigo
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1174606group_id=5470
Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Bugs item #1173637, was opened at 2005-03-30 23:37
Message generated for change (Comment added) made by sjoerd
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1173637group_id=5470
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Bugs item #1174795, was opened at 2005-04-01 15:49
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1174795group_id=5470
Category: Windows
Group: Python 2.4
Status: Open
Bugs item #1174795, was opened at 2005-04-01 21:49
Message generated for change (Comment added) made by quiver
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1174795group_id=5470
Category: Windows
Group: Python 2.4
Status: Open
Resolution: None
Priority:
Bugs item #1173637, was opened at 2005-03-30 16:37
Message generated for change (Comment added) made by rhettinger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1173637group_id=5470
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Bugs item #997100, was opened at 2004-07-24 10:20
Message generated for change (Comment added) made by hydrian
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=997100group_id=5470
Category: Python Library
Group: Python 2.3
Status: Closed
Resolution: Fixed
Bugs item #1175022, was opened at 2005-04-01 20:09
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1175022group_id=5470
Category: Documentation
Group: Python 2.4
Status: Open
Bugs item #1174795, was opened at 2005-04-01 04:49
Message generated for change (Comment added) made by bcannon
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1174795group_id=5470
Category: Windows
Group: Python 2.4
Status: Closed
Resolution: Invalid
Bugs item #1170424, was opened at 2005-03-25 10:58
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1170424group_id=5470
Category: Distutils
Group: None
Status: Closed
Resolution: Invalid
Priority:
Bugs item #1169633, was opened at 2005-03-24 05:04
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1169633group_id=5470
Category: Installation
Group: Python 2.4
Status: Open
Resolution: None
Bugs item #1167262, was opened at 2005-03-21 04:25
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1167262group_id=5470
Category: Python Library
Group: Python 2.5
Status: Open
Resolution: None
Bugs item #997100, was opened at 2004-07-24 11:20
Message generated for change (Comment added) made by gward
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=997100group_id=5470
Category: Python Library
Group: Python 2.3
Status: Closed
Resolution: Fixed
201 - 228 of 228 matches
Mail list logo