Su Y [EMAIL PROTECTED] wrote:
I want find the first number in extend[] which is larger than num, so
I wrote:
def find(num):
count=0
for elem in extend:
if elemnum:
count+=1
return count
I found that if extend[] is monotonous, like [1.1, 2.3, 3.2, 4.5,
Jean-Paul Calderone [EMAIL PROTECTED] wrote:
On Thu, 29 Mar 2007 07:29:35 +0200, Hendrik van Rooyen
[EMAIL PROTECTED] wrote:
Are sockets full duplex?
Uh, yes.
The reason I asked is that I have noticed that other file like objects
(on Suse 10 Linux and Python 2.4 out of the box) aren't
[EMAIL PROTECTED] wrote:
hg My issue with that is the effect on write: I only want a timeout on
hg read ... but anyway ...
So set a long timeout when you want to write and short timeout when you want
to read.
Are sockets full duplex?
I know Ethernet isn't.
- Hendrik
--
Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Wed, 28 Mar 2007 07:55:20 +0200, Hendrik van Rooyen
[EMAIL PROTECTED] declaimed the following in comp.lang.python:
Pretty obvious of course, as is the pronounciation of the
name: Cholmondely
Is that a scottish Ch (as in LoCH Lomond
Nick Craig-Wood [EMAIL PROTECTED] wrote:
Well, yes there are different levels of potential reliability with
different implementation strategies for each!
Gadzooks! Foiled again by the horses for courses argument.
; - )
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
Diez B. Roggisch [EMAIL PROTECTED] wrote:
Nick Craig-Wood wrote:
Did anyone write a contextmanager implementing a timeout for
python2.5?
I'd love to be able to write something like
with timeout(5.0) as exceeded:
some_long_running_stuff()
if exceeded:
Nick Craig-Wood [EMAIL PROTECTED] wrote:
Hendrik van Rooyen [EMAIL PROTECTED] wrote:
But would be useful to be able to do without messing with
threads and GUI and imports.
Could be hard to implement as the interpreter would have
to be assured of getting control back
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
Dennis Lee Bieber a écrit :
On Wed, 21 Mar 2007 21:40:51 +0100, Bruno Desthuilliers
[EMAIL PROTECTED] declaimed the following in
comp.lang.python:
For future reference, and I hope you don't mind the lesson,
I don't.
the past
tense of bind is
Steven D'Aprano [EMAIL PROTECTED] wrote:
On Fri, 23 Mar 2007 13:15:29 -0700, John Machin wrote:
OK, I'll bite: This was new in late 2000 when Python 2.0 was
released. Where have you been in the last ~6.5 years?
Western civilization is 6,000 years old. Anything after 1850 is new.
Steven D'Aprano [EMAIL PROTECTED] wrote:
On Tue, 20 Mar 2007 13:01:36 +0100, Bruno Desthuilliers wrote:
8 --- confusion about left and right
It gets worse.
When you work on a lathe,
a right hand cutting tool
has its cutting edge
on the left...
And the worse part is that
its
Horta [EMAIL PROTECTED] wrote:
Sometimes, when I do an os.popen*(), the process executed by the
command hangs, and the script stops forever on the readline()/
readlines() calls. I found that I can use select, but I'm thinking...
if, after a sellect() call returns, the stdout (for example)
frikk [EMAIL PROTECTED] wrote:
I am looking into a project for the company I work for. Essentially
it involves setting up a real time monitor / signal injector in
between a CPU board and a system controller. The system controller
sends signals (message packets) to the CPU board. We would
Duncan Smith [EMAIL PROTECTED] wrote:
Yes, if the generating processes yield numbers from different
probability mass functions. You could simply look at the likelihood
ratio. Otherwise, the likelihood ratio will be 1.
I was thinking about the same random number generator being used in
Steven D'Aprano [EMAIL PROTECTED] wrote:
Easy-peasey. Just collate the individual numbers from the lists, and graph
their frequencies. You will get quite different distributions. Both are
random, but in different ways.
8 code -
Thanks - I think too complex - was
Gabriel Genellina [EMAIL PROTECTED] wrote:
You can't have two different sets with four equal numbers - it's not a
very difficult thing, it's impossible to distinguish because they're
identical!
Given 4 numbers in the set, the 5th is uniquely determined. By example:
12, 3, 10, 18 *must* end with
Steven D'Aprano [EMAIL PROTECTED] wrote:
Consider the distance between each paid of consecutive poles. The sum of
the distances must add up to the distance from the first to the last, and
if there are two fixed poles plus five in between, there are five
distances.
No there are six
Nick Craig-Wood [EMAIL PROTECTED] wrote:
Paul Rubin http wrote:
The fencepost method still seems to be simplest:
t = sorted(random.sample(xrange(1,50), 4))
print [(j-i) for i,j in zip([0]+t, t+[50])]
Mmm, nice.
Here is another effort which is easier to reason about the
Paddy [EMAIL PROTECTED] wrote
Hey, I'm still learnin'. Sweet!
contrary to popular belief, the answer to life,
the universe, happiness and everything is
not 42, but the above.
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
David Cramer [EMAIL PROTECTED] wrote:
If you had an application that you were about to begin development on
which you wanted to be cross platform (at least Mac and Windows),
would you suggest using c++ and Python?
I'm asking because we were originally thinking about doing c# but
after
Paul Rubin http://[EMAIL PROTECTED] wrote:
Bjoern Schliessmann [EMAIL PROTECTED] writes:
(Why does everyone think that concurrency equals usage of
multiple threads?)
Well, it doesn't necessarily, but that's easiest a lot of the time.
Try Twisted for your networking needs.
I
Grant Edwards [EMAIL PROTECTED] wrote:
On 2007-03-10, Hendrik van Rooyen [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
Oh, thanks for the advice then. And as for Grant..look forward to
seeing more of your posts.
YOW! - some recognition at last!
:)
I see somebody pays
[EMAIL PROTECTED] wrote:
Oh, thanks for the advice then. And as for Grant..look forward to
seeing more of your posts.
YOW! - some recognition at last!
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
David Bear [EMAIL PROTECTED] wrote:
Diez B. Roggisch wrote:
Why don't you use a DB for that? If you want pickles, use a blob
column. But all the rest - a defined protocol, stable server,
transactions - you get for free.
Diez
Thanks for the suggestion. I did think of this. Indeed
Steven D'Aprano stybersource.com.au wrote:
8 --- some code with heavy reliance on Booleans and
'is' ---
All Right.
This has convinced me.
Some Australians do have a sense of humour.
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
Paolo Pantaleo [EMAIL PROTECTED] wrote:
$./x
$echo $?
20
$ python
give the following commands:
import os
os.system(/tmp/x)
5120
256 times 20 is 5120
this is a big/little endian little bug
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
Piet van Oostrum [EMAIL PROTECTED] wrote:
Bart Ogryczak [EMAIL PROTECTED] (BO) wrote:
BO Any system with 8-bit bytes, which would mean any system made after
BO 1965. I'm not aware of any Python implementation for UNIVAC, so I
BO wouldn't worry ;-)
1965? I worked with non-8-byte machines
Bart Ogryczak [EMAIL PROTECTED] wrote:
On Mar 5, 10:51 am, Piet van Oostrum [EMAIL PROTECTED] wrote:
Bart Ogryczak [EMAIL PROTECTED] (BO) wrote:
BO Any system with 8-bit bytes, which would mean any system made after
BO 1965. I'm not aware of any Python implementation for UNIVAC, so I
Alex Martelli [EMAIL PROTECTED] wrote:
Raymond Hettinger [EMAIL PROTECTED] wrote:
...
The notion that pop is only defined for stack operations is somewhat
pedantic.
Worse: it's totally wrong. It's also defined for eyes, as a musical
genre, as a kind of soda, as an avant-garde
[EMAIL PROTECTED] wrote:
Thanks Bart. That's perfect. The other suggestion was to precompute
count1 for all possible bytes, I guess that's 0-256, right?
0 to 255 inclusive, actually - that is 256 numbers...
The largest number representable in a byte is 255
eight bits, of value
[EMAIL PROTECTED] wrote:
Hi,
Thanks for your answer. I had a look into the fcntl module and tried
to unlock the output-file, but
fcntl.lockf(x.stdout, fcntl.LOCK_UN)
Traceback (most recent call last):
File stdin, line 1, in module
IOError: [Errno 9] Bad file descriptor
I
[EMAIL PROTECTED] wrote:
8--
The C programm gets its commands from its stdin and sends its state
to stdout. Thus I have some kind of dialog over stdin.
So, once I start the C Program from the shell, I immediately get its
output in my terminal. If I start it from a
Ishpeck [EMAIL PROTECTED] wrote:
8--- a bash problem -
If it were Python, the advice would have been to use the
print statement to figure out what the content of the
variables were.
As it is Bash, you may have to stoop to something like
echo to see what is in
[EMAIL PROTECTED] wrote:
Is it possible to read to and write to the std streams of a
subprocess? What am I doing wrong?
I think this problem lies deeper - there has been a lot of
complaints about blocking and data getting stuck in pipes
and sockets...
I have noticed that the Python file
luvsat [EMAIL PROTECTED] wrote:
Hello all,
I am new to python and working on a project that involves designing a
new language. The grammar of the language is very much inspired from
python as in is supports nearly all the statements and expressions
that are supported by python.
James Stroud [EMAIL PROTECTED] wrote:
Clement wrote:
Can any body tell how Dict is implemented in python... plz tell what
datastructure that uses
I think it uses a dict.
Groan! - this answer is like Microsoft documentation -
while technically correct, it is
hg [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
Hello everybody,
I have a (hopefully) simple question about scoping in python. I have a
program written as a package, with two files of interest. The two
files are /p.py and /lib/q.py
Make a third file for all the system wide
Arnaud Delobelle [EMAIL PROTECTED] wrote:
On Feb 25, 6:00 pm, Paddy [EMAIL PROTECTED] wrote:
I blogged on finding a new-to-me feature of Python, in that you are
allowed to nnest parameter definitions:
def x ((p0, p1), p2):
... return p0,p1,p2
... x(('Does', 'this'), 'work')
Paul Rubin http://[EMAIL PROTECTED] wrote:
Hendrik van Rooyen [EMAIL PROTECTED] writes:
s = 'some string that needs a bcc appended'
ar = array.array('B',s)
bcc = 0
for x in ar[:]:
bcc ^= x
ar.append(bcc)
s=ar.tostring()
Untested:
import operator
s = 'some string
Diez B. Roggisch [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
8 request to remove colon --
Won't happen. There have been plenty of discussions about this, and while
technically not necessary, the colon is usually considered optically
pleasing. So -
Steven D'Aprano [EMAIL PROTECTED] wrote:
On Thu, 22 Feb 2007 08:18:07 +0200, Hendrik van Rooyen wrote:
I would xor each char in it with 'U' as a mild form of obfuscation...
I've often wished this would work.
'a' ^ 'U'
Traceback (most recent call last):
File stdin, line 1
Harlin Seritt [EMAIL PROTECTED] wrote:
Hi...
I would like to take a string like 'supercalifragilisticexpialidocius'
and write it to a file in binary forms -- this way a user cannot read
the string in case they were try to open in something like ascii text
editor. I'd also like to be able
Nick Craig-Wood [EMAIL PROTECTED] wrote:
Ie
x += a
does not equal
x = x + a
which it really should for all types of x and a
One would hope so , yes.
However, I think that the first form is supposed to update in place,
while the second is free to bind a new thing to x
joanne matthews (RRes-Roth) [EMAIL PROTECTED] wrote:
8
Can anyone tell me whats going on
and how I can avoid the problem. Thanks
Don't know about the first question.
Would avoid it by using ints and asking for percentages...
- Hendrik
--
Jay Tee [EMAIL PROTECTED] wrote:
Hi,
I have some code that does, essentially, the following:
- gather information on tens of thousands of items (in this case, jobs
running on a
compute cluster)
- store the information as a list (one per job) of Job items
(essentially wrapped
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
Stef Mientki a écrit :
(snip)
I've been using Python for just 2 months, and didn't try any graphical
design,
So how can you comment on GUI programming with Python ?
I think we have a language problem here (no pun intended)
When Stef says Gui
Paul Rubin http://[EMAIL PROTECTED] wrote:
Steven Bethard [EMAIL PROTECTED] writes:
Yes, a lot of people liked this approach, but it was rejected due to
gratuitous breakage. While Python 3.0 is not afraid to break backwards
compatibility, it tries to do so only when there's a very
Schüle Daniel [EMAIL PROTECTED] wrote:
{:} for empty dict and {} for empty set don't look too much atrocious
to me.
this looks consistent to me
I disagree. What would be consistent would be to follow the pattern,
and use a different set of delimiters.
Python uses () for tuples, [] for
Steve Holden [EMAIL PROTECTED] wrote:
Jean-Paul Calderone wrote:
I think some people are confused that the language Python 3.x has Python
in its name, since there is already a language with Python in its name,
with which it is not compatible.
Right. Let's call Python 3.0 something
exhuma.twn [EMAIL PROTECTED] wrote:
Hi all,
Supposing you have two separate processes running on the same box,
what approach would you suggest to communicate between those two
processes.
8 -- sockets,webservices,CORBA,shared memory ---
Supposing both processes are
Sorin Schwimmer wrote:
8-
def handler(self,event):
self.aButton.unbind('Return')
self.aButton.unbind('KP_Enter')
8-
The idea is to prevent a fast user (like my boss) to press repeatedly the
enter
key and create havoc with self.property
Tim Golden [EMAIL PROTECTED] wrote:
Tyrrell, Wendy wrote:
(Well, nothing)
8--
Your organisation seems to deal with partnerships between
business and education; are you looking to promote the use
of programming in schools? Or is there something else you're
after?
John Machin [EMAIL PROTECTED] wrote:
Now for the algorithm: all of that testing to see if you are about to
sail off the end of the world is a bit ugly and slow. You can use bit-
bashing, as Paul suggested, even though it's on Steven D'Aprano's list
of 6 deadly sins :-)
Thou shallt not bit
Eric Brunel [EMAIL PROTECTED] wrote:
FYI, changes done in tcl/tk are usually quite rapidly integrated in
Tkinter. For example, for the panedwindow widget, introduced in tk8.4
(first version out in the end of 2002), a Tkinter wrapper was available in
Python 2.3 (first version out mid-2003). So I
Jean-Paul Calderone [EMAIL PROTECTED] wrote:
Yep. There are even some existing Python applications which deal with
sound and manage to work with ~20ms samples.
I agree. Python is not *that* slow...
I have written serial port communications that send and catch one
character at a time (raw,
John Machin [EMAIL PROTECTED] wrote:
On Feb 13, 4:57 pm, Hendrik van Rooyen [EMAIL PROTECTED] wrote:
John Machin [EMAIL PROTECTED] wrote:
Now for the algorithm: all of that testing to see if you are about to
sail off the end of the world is a bit ugly and slow. You can use bit
Mathias [EMAIL PROTECTED] wrote:
Does someone have experience with threading in python - are there
non-threadsafe functions I should know about?
how do your threads communicate with one another - are there any
globals that are accessed from different threads?
strange this - you should get
Steve Holden [EMAIL PROTECTED]
Hendrik van Rooyen wrote:
[EMAIL PROTECTED] wrote:
Ben Sizer [EMAIL PROTECTED] wrote:
Ben Python extensions written in C require recompilation for each new
Ben version of Python, due to Python limitations.
Can you propose a means
Ben Sizer [EMAIL PROTECTED] wrote:
On Feb 10, 8:42 am, Steve Holden [EMAIL PROTECTED] wrote:
Hendrik van Rooyen wrote:
[EMAIL PROTECTED] wrote:
Ben Sizer [EMAIL PROTECTED] wrote:
Ben Python extensions written in C require recompilation for each
new
Ben version of Python
Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Thu, 8 Feb 2007 10:55:17 +0200, Hendrik van Rooyen
[EMAIL PROTECTED] declaimed the following in comp.lang.python:
I am under the impression that Loki had a daughter called Hel ...
One of his few normal offspring... After all, Loki also
[EMAIL PROTECTED] wrote:
Ben Sizer [EMAIL PROTECTED] wrote:
Ben Python extensions written in C require recompilation for each new
Ben version of Python, due to Python limitations.
Can you propose a means to eliminate this limitation?
Yes. - Instead of calling something, send it
Tina I [EMAIL PROTECTED] wrote:
Gosi wrote:
On Feb 7, 3:46 pm, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
In [EMAIL PROTECTED], Gosi wrote:
I like to use J for many things and I think that combining Python and
J is a hell of a good mixture.
I was able to follow this sentence up to
LAPI, VINCENT J, ATTLABS wrote:
Hi,
Please bear with me as I am new to Python and have not done any programming in
about 20 years. I am attempting to do a simple interpolation of a line's
intermediate points given the x,y coordinates of the line's two endpoints
within an Active State Python
Carl J. Van Arsdall [EMAIL PROTECTED] wrote:
Hendrik van Rooyen wrote:
Carl J. Van Arsdall [EMAIL PROTECTED] wrote:
8 ---
Yea, I do some of that too. I use that with conditional print
statements to stderr when i'm doing my validation
Carl J. Van Arsdall [EMAIL PROTECTED] wrote:
Right, I wasn't coming here to get someone to debug my app, I'm just
looking for ideas. I constantly am trying to find new ways to improve
my software and new ways to reduce bugs, and when i get really stuck,
new ways to track bugs down. The
Martin P. Hellwig [EMAIL PROTECTED] wrote:
Stef Mientki wrote:
[EMAIL PROTECTED] wrote:
Got a note about a new page on the Python Wiki:
Wade == Wade McDaniel [EMAIL PROTECTED] writes:
http://wiki.python.org/moin/Selcuk_Altun
I suspect it's junk since it doesn't seem to
Jorgen Grahn [EMAIL PROTECTED] wrote:
FWIW, I oppose the idea (paraphrased from further up the thread) that linked
lists and other data structures are obsolete and dying concepts, obsoleted
by Python and other modern languages.
99% of the time. a Python list is the right tool for the job,
Steven D'Aprano [EMAIL PROTECTED] wrote:
Or perhaps I should say:
.snoitnevnoc
hsilgnE tpada )ylbissop revenehw( dluohs ew os dna ,naitraM ton ,puorgswen
egaugnal hsilgnE na no er'ew ,segaugnal hcus era ereht fi neve tuB
First I thought it was Welsh or Cornish or something.
Then it was
Nick Maclaren [EMAIL PROTECTED] wrote:
Hmm. The extensions documentation describes how to add instance
members to a class (PyMemberDef), but I want to add a class member.
Yes, this is constant for all instances of the class.
Any pointers?
When? - at time of defining base class, between
David Hirschfield [EMAIL PROTECTED] wrote:
8 --- problems on syncing up in serial comms -
I have seen people address this with success by using stuff like:
XXHEADERXX as a here starts the lesson identifier, with no
trouble, on a high volume newsfeed.
If you assume
Nick Maclaren [EMAIL PROTECTED] wrote:
In article [EMAIL PROTECTED],
Hendrik van Rooyen [EMAIL PROTECTED] writes:
|
| Hmm. The extensions documentation describes how to add instance
| members to a class (PyMemberDef), but I want to add a class member.
| Yes, this is constant
Nick Maclaren [EMAIL PROTECTED] wrote:
[Tim Roberts]
| Actually, this is a very well studied part of computer science called
| interval arithmetic. As you say, you do every computation twice, once to
| compute the minimum, once to compute the maximum. When you're done, you
| can be
of thumb is that 28
digits with a decimal base was comparable to (say) 80 bits with a
binary base.
[Hendrik van Rooyen]
I would have thought that this sort of thing was a natural consequence
of rounding errors - if I round (or worse truncate) a binary, I can be
off by at most one
Dennis Lee Bieber [EMAIL PROTECTED]wrote:
On Sun, 14 Jan 2007 07:18:11 +0200, Hendrik van Rooyen
[EMAIL PROTECTED] declaimed the following in comp.lang.python:
I recall an SF character known as Slipstick Libby,
who was supposed to be a Genius - but I forget
the setting
From: Nick Maclaren [EMAIL PROTECTED] wrote:
Financial calculations need decimal FIXED-point, with a precisely
specified precision. It is claimed that decimal FLOATING-point
helps with providing that, but that claim is extremely dubious.
I can explain the problem in as much detail as you
robert [EMAIL PROTECTED] wrote:
Hendrik van Rooyen wrote:
So far I have only used dicts to pass functions around
in a relatively unimaginative static jump table like way...
Probably one has just to see that one can a pass a function object
(or any callable) around as any other
Dennis Lee Bieber [EMAIL PROTECTED] wrote:
{My 8th grade teacher was a bit worried at seeing me with a slipstick
G; and my HighSchool Trig/Geometry teacher only required 3 significant
digits for answers -- even though half the class had calculators by
then}
LOL - I haven't seen the word
Nick Maclaren [EMAIL PROTECTED] wrote:
The cheap means cheap in hardware - it needs very little logic,
which is why it was used on the old, discrete-logic, machines.
I have been told by hardware people that implementing IEEE 754 rounding
and denormalised numbers needs a horrific amount of
Torabisu [EMAIL PROTECTED] wrote:
Hendrik van Rooyen wrote:
What do you want done? - I am only a thousand miles away...
If I can just get my Python teleporter sorted out, distance will be no
problem... A little buggy at the moment though... Poor John, I told
him not to test
William Heymann [EMAIL PROTECTED] wrote:
So you know I tried this on ubuntu edgy 64bit edition on a dual 2218 opteron
system with 8G of ram and I got
lots of output
Exception raised: can't start new thread
Biggest number of threads: 32274
This almost looks as if the number of threads
Torabisu [EMAIL PROTECTED] wrote:
billie wrote:
Torabisu wrote:
Its quite weird, we're looking for Python skills but are battling to
find at the moment... Normally Python on its own will probably not
land you a job, but the last two companies I've worked for are doing
Nick Maclaren [EMAIL PROTECTED] wrote:
In article [EMAIL PROTECTED],
Hendrik van Rooyen [EMAIL PROTECTED] writes:
|
| I would have thought that this sort of thing was a natural consequence
| of rounding errors - if I round (or worse truncate) a binary, I can be off
| by at most one
Paul Rubin http://[EMAIL PROTECTED] wrote:
Hendrik van Rooyen [EMAIL PROTECTED] writes:
am aware of Queue module - the same app uses it for something else.
I dont like too many try -- excepts in the code - I find they confuse
me when I try to read it later - and in this case I cannot
Paul Rubin http://[EMAIL PROTECTED] wrote:
Paul Rubin http://[EMAIL PROTECTED] writes:
def get_from_queue(queue):
try:
return queue.get(block=False)
except Queue.Empty:
return QUEUE_IS_EMPTY
Alternatively:
def get_from_queue(queue):
Software Hiring [EMAIL PROTECTED] wrote:
If you're interested in relocating to India for such a good
opportunity and be a part of the World's Best Software Company and if
you have good skill sets in:
C, C++, C#, Java (for .Net Platform or Visual Studio)
OR
C, C++, Java, Product
robert [EMAIL PROTECTED] wrote:
pushing data objects through an inter-thread queue is a major source for
trouble - as this thread shows again.
Everybody builds up a new protocol and worries about Empty/Full,
Exception-handling/passing, None-Elements, ...
I've noticed that those troubles
Nick Maclaren [EMAIL PROTECTED] wrote:
Yes, but that wasn't their point. It was that in (say) iterative
algorithms, the error builds up by a factor of the base at every step.
If it wasn't for the fact that errors build up, almost all programs
could ignore numerical analysis and still get
Gigs_ [EMAIL PROTECTED] wrote:
Now is all clearer thanks to [EMAIL PROTECTED] and Hendrick van Rooyen
Contrary to popular belief in the English speaking world -
c in Hendrik
False
There is no c in Hendrik
: - )- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
Jorgen Grahn [EMAIL PROTECTED]wrote:
On 8 Jan 2007 23:57:29 -0800, Paddy [EMAIL PROTECTED] wrote:
OK, whilst colons are not sufficient to re-format a completely
mis-indented file. I'm thinking that they are sufficient for
reformatting most pasted code blocks when refactoring say?
Steven D'Aprano [EMAIL PROTECTED] wrote:
On Tue, 09 Jan 2007 10:27:56 +0200, Hendrik van Rooyen wrote:
Steven D'Aprano [EMAIL PROTECTED] wrote:
On Mon, 08 Jan 2007 13:11:14 +0200, Hendrik van Rooyen wrote:
When you hear a programmer use the word probability -
then its time
Hi,
I would like to do the following as one atomic operation:
1) Append an item to a list
2) Set a Boolean indicator
It would be almost like getting and holding the GIL,
to prevent a thread swap out between the two operations.
- sort of the inverted function than for which the GIL
seems to be
robert [EMAIL PROTECTED] wrote:
Hendrik van Rooyen wrote:
Hi,
I would like to do the following as one atomic operation:
1) Append an item to a list
2) Set a Boolean indicator
I doubt you have to worry at all about this in such simple single-single
queue - if there is not a much
Paul Rubin http://[EMAIL PROTECTED] wrote:
Hendrik van Rooyen [EMAIL PROTECTED] writes:
I would like to do the following as one atomic operation:
1) Append an item to a list
2) Set a Boolean indicator
You could do it with locks as others have suggested, but maybe you
really want
Steve Holden [EMAIL PROTECTED] wrote:
Hendrik van Rooyen wrote:
Hi,
I would like to do the following as one atomic operation:
1) Append an item to a list
2) Set a Boolean indicator
It would be almost like getting and holding the GIL,
to prevent a thread swap out between
Chris Mellon [EMAIL PROTECTED] wrote:
sigh Repost. Is there any chance at all that ML could set the
reply-to to the list instead of the sender?
+1
- I regularly hit reply all, delete the OP, and then I get :
Message has a suspicious header
- Hendrik
--
cesco [EMAIL PROTECTED] wrote:
Neil Cerutti wrote:
On 2007-01-08, cesco [EMAIL PROTECTED] wrote:
Hi,
I have a dictionary of lists of tuples like in the following example:
dict = {1: [(3, 4), (5, 8)],
2: [(5, 4), (21, 3), (19, 2)],
3: [(16, 1), (0, 2), (1,
Gigs_ [EMAIL PROTECTED] wrote:
Can someone explain me bitwise expression?
few examples for every expression will be nice
x y Left shift
x y Right shift
x y Bitwise AND
x | y Bitwise OR
x ^ y Bitwise XOR (exclusive OR)
~x Bitwise negation
The short, and possibly weird, but true,
siggi [EMAIL PROTECTED] wrote:
Is there a simple code formatter that first removes all indentations and
then refomats correctly?
tabnanny ?
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano [EMAIL PROTECTED] wrote:
On Mon, 08 Jan 2007 13:11:14 +0200, Hendrik van Rooyen wrote:
When you hear a programmer use the word probability -
then its time to fire him, as in programming even the lowest
probability is a certainty when you are doing millions of
things
rzed [EMAIL PROTECTED] wrote:
mmm... sloppy joes
--
rzed
A sandwich is a sandwich, but a Manwich is a meal.
You eat people?
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin http://[EMAIL PROTECTED] wrote:
If you want to write bug-free code, pessimism is the name of the game.
A healthy touch of paranoia does not come amiss either...
And even then things foul up in strange ways because your head
is never quite literal enough.
When you hear a programmer
601 - 700 of 879 matches
Mail list logo