Hi,
Trying the multiprocessing module for the first time, I spent quite a
bit on making this code run:
from multiprocessing import Process
import time
def my_process():
i = 0
while 1:
print i
i += 1
time.sleep(0.5)
p = Process(target=my_process, args=())
(This is actually a repost; outgoing netnews server was down for a while.)
John Nagle wrote:
Is MySQLdb available for Python 3.1 yet?
http://sourceforge.net/projects/mysql-python/
says the last supported Python version is 2.5. Any progress in sight?
John Nagle
--
Me again, fix a type in my question:
So my question is what actually happens when I call p.start()? Is the
*entire* file reloaded under a different module name?
Thanks
iu2
--
http://mail.python.org/mailman/listinfo/python-list
Peter Otten wrote:
Utpal Sarkar wrote:
Is there a way I can tell a variable that the object it is pointing
too is not owned by it, in the sense that if it is the only reference
to the object it can be garbage collected?
http://docs.python.org/library/weakref.html
Yes. Weak references
On Sat, Jul 25, 2009 at 11:23 PM, golubhardwajjaye...@gmail.com wrote:
here is a code which crawls links sent to it. theres some problem with
the retrieve_url function ,plz help me out in debugging the fuction
retrive_url. This function retrives pages and saves them in file
Please specify
here is a code which crawls links sent to it. theres some problem with
the retrieve_url function ,plz help me out in debugging the fuction
retrive_url. This function retrives pages and saves them in file
#TODO:Visited dict grows in size it needs to be handled smartly
#Moreover server program needs
On Jul 26, 11:28 am, Chris Rebert c...@rebertia.com wrote:
On Sat, Jul 25, 2009 at 11:23 PM, golubhardwajjaye...@gmail.com wrote:
here is a code which crawls links sent to it. theres some problem with
the retrieve_url function ,plz help me out in debugging the fuction
retrive_url. This
the following function retrieves pages from the web and saves them in
a specified dir. i want to extract the respective filenames from the
urls e.g the page code.google.com shud be saved as code-google.htm or
something similar. can u suggest me a way to do it
def retrieve_url(self,url):
On Sunday 26 July 2009 00:42:26 Marcus Wanner wrote:
On 7/25/2009 10:08 AM, Piet van Oostrum wrote:
Steven D'Aprano st...@remove-this-cybersource.com.au (SD) wrote:
SD Ambiguity essentially boils down to being unable to reasonably
predict SD the expectation of the coder. I say reasonably,
On Saturday 25 July 2009 20:30:54 Michal Kwiatkowski wrote:
Hi,
Is there a way to tell if a generator has been exhausted using pure
Python code? I've looked at CPython sources and it seems that
something like active/exhausted attribute on genobject is missing
from the API. For the time being
On Friday 24 July 2009 17:14:06 you wrote:
Hrvoje Niksic hnik...@xemacs.org writes:
The term variable is used in the Python language reference and
elsewhere
Yes. It should also be abundantly clear from the constant stream of
confused newbies on this point that its usage of that term is
When would I use PyObject_SetAttrString/tp_dictoffset instead of tp_members?
When I have a variable list of attributes, and cannot statically know
what those attributes might be.
I have a predefined set of members, some of which are optional.
Having optional fields is also a good reason.
En Sun, 26 Jul 2009 02:52:36 -0300, is un israel.unter...@gmail.com
escribió:
Trying the multiprocessing module for the first time, I spent quite a
bit on making this code run:
[...]
The result was not what I expected, it seems like the process restarts
all the time, and the message 'Process
Hello,
I am trying to compile Python 2.6.2 on my Mac which has os/x 10.5.7
I downloaded python 2.6.2 from here:
- http://www.python.org/ftp/python/2.6.2/Python-2.6.2.tar.bz2
I unpacked it.
I ran these shell commands:
- ./configure --prefix=/pt/p
- make
Near the end of the make output I
On Sun, 26 Jul 2009 08:30:30 +1000, Lie Ryan wrote:
since on my system socket.gethostname() returns 'lieryan', and since
socket.gethostbyname('lieryan') does not resolve to anything; the test
becomes an error.
My system is Gentoo, but I think this also happened on Ubuntu (still on
this
On Sun, Jul 26, 2009 at 1:12 AM, Jessica R
Smithjessica.1980.sm...@gmail.com wrote:
Hello,
I am trying to compile Python 2.6.2 on my Mac which has os/x 10.5.7
I downloaded python 2.6.2 from here:
- http://www.python.org/ftp/python/2.6.2/Python-2.6.2.tar.bz2
I unpacked it.
I ran these
On Jul 26, 1:10 am, Ben Finney ben+pyt...@benfinney.id.au wrote:
Michal Kwiatkowski constant.b...@gmail.com writes:
I may be missing something obvious here. Is there a better way to tell
if a given generator object is still active or not?
foo = the_generator_object
try:
Chris thanks!!
other members:
I read this:
- http://chrismiles.livejournal.com/25648.html
I did this:
- install mac ports
- port install readline
- vi setup.py
def detect_modules(self):
# Ensure that /usr/local is always used
Aahz wrote:
In article h49ah5$hv3$0...@news.t-online.com,
Peter Otten __pete...@web.de wrote:
I have a hunch that you are triggering a reload() somewhere. Example:
Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
[GCC 4.3.3] on linux2
Type help, copyright, credits or license for more
En Sun, 26 Jul 2009 03:33:27 -0300, golu bhardwajjaye...@gmail.com
escribió:
i want to save pages in a directory and i m using the urls to get
filenames. The program gets stuck in the saving step.can u suggest me
a way to save a page e.g google.com as a file google.html
You may use
On Sat, 25 Jul 2009 16:21:39 -0700, Erik Max Francis wrote:
Steven D'Aprano wrote:
But it's not practically every function. It's hardly any function at
all -- in my code, I don't think I've ever wanted this behavior. I
would consider it an error for function(42) and function([42]) to
behave
Martin v. Löwis wrote:
I have a predefined set of members, some of which are optional.
Having optional fields is also a good reason.
What is the use of T_OBJECT_EX vs T_OBJECT in PyMemberDef then? I would
have though that the former describes an optional field, because the
behaviour of
On Jul 26, 8:52 am, is un israel.unter...@gmail.com wrote:
Hi,
Trying the multiprocessing module for the first time, I spent quite a
bit on making this code run:
from multiprocessing import Process
import time
def my_process():
i = 0
while 1:
print i
i += 1
Tom wrote:
s = sauce.replace(\n, )
Sauce is a string, read from a file, that I need to remove newlines
from. This code works fine in Linux, but not in Windows. rstrip(\n)
won't work for me, so anybody know how to get this working on Windows?
I'm pretty sure this works regardless of the
Steven D'Aprano wrote:
I'm curious what those applications are, because regular multiplication
behaves differently depending on whether you have a 1x1 matrix or a
scalar:
[[2]]*[[1, 2, 3], [2, 3, 4]] is not defined
2*[[1, 2, 3], [2, 3, 4]] = [[2, 4, 6], [2, 6, 8]]
I'm curious as to what
On 24-07-2009, Christian Tismer wrote:
On 7/24/09 1:04 AM, William Dode wrote:
On 23-07-2009, Christian Tismer wrote:
...
Wasn't the project plan saying the opposite, borrowing
some ideas from psyco? :-)
http://code.google.com/p/unladen-swallow/wiki/ProjectPlan
How do you see the future
Jessica Smith schrieb:
Chris thanks!!
other members:
I read this:
- http://chrismiles.livejournal.com/25648.html
I did this:
- install mac ports
- port install readline
- vi setup.py
def detect_modules(self):
# Ensure that /usr/local is always used
Neil Hodgson wrote:
casebash:
I have searched this list and found out that Python doesn't have a
mutable string class (it had an inefficient one, but this was removed
in 3.0). Are there any libraries outside the core that offer this?
I wrote a gap buffer implementation for Python 2.5
MRAB pyt...@mrabarnett.plus.com (M) wrote:
M scriptlear...@gmail.com wrote:
I decided to go with one big log file, which will be shared by all
threads (child and parent). A log message Queue is used to store all
log entries, and a customized logger thread will get log entries from
the
On Jul 24, 5:03 am, Robert Kern robert.k...@gmail.com wrote:
On 2009-07-23 03:55, Helvin wrote:
I believe I now have vtkpython.exe. However, my 'import vtk' statement
in my python code is not working. The error says something like no
module named vtk.
Where do I find modules for vtk
In article h4gnmr$8c...@news.eternal-september.org,
Raffael Cavallaro raffaelcavall...@pas.espam.s.il.vous.plait.mac.com wrote:
On 2009-07-25 00:55:26 -0400, Carl Banks pavlovevide...@gmail.com said:
But please don't put it on the same level as PHP. Their situations
have almost nothing in
On 2009-07-26 09:16:39 -0400, a...@pythoncraft.com (Aahz) said:
There are plenty of expert C++
programmers who switched to Python;
plenty is an absolute term, not a relative term. I sincerely doubt
that the majority of python users were formerly *expert* C++
programmers.
your thesis only
I'm trying to get one of the examples from Foundation of Python
Network Programming to work. Specifically this is the UDP example
from Ch 3. First there is the server:
#!/usr/bin/env python
# UDP Echo Server - Chapter 3 - udpechoserver.py
import socket, traceback, time
host = '127.0.0.1'
Paul Barry wrote:
I'm trying to get one of the examples from Foundation of Python
Network Programming to work. Specifically this is the UDP example
from Ch 3. First there is the server:
#!/usr/bin/env python
# UDP Echo Server - Chapter 3 - udpechoserver.py
import socket, traceback, time
host
Is there any way for me to save some sort of global preference for
python that I can read/write at runtime that doesn't involve me
explicitly creating a file? It may create a file underneath, but I
don't want some path hard coded to my routine.
In Windows, the Registry serves this purpose. Is
gert schrieb:
On Jul 25, 2:33 am, Diez B. Roggisch de...@nospam.web.de wrote:
gert schrieb:
On Jul 24, 7:32 pm, Diez B. Roggisch de...@nospam.web.de wrote:
gert schrieb:
this is a non standard way to store multi part post data on disk
def application(environ, response):
with
On Jul 26, 2009, at 5:09 PM, Robert Avery wrote:
In Windows, the Registry serves this purpose. Is there something
similar for Mac?
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/Reference/Reference.html
In article mailman.3648.1248429993.8015.python-l...@python.org,
Gabriel Genellina gagsl-...@yahoo.com.ar wrote:
En Thu, 23 Jul 2009 21:27:35 -0300, Aahz a...@pythoncraft.com escribió:
In article mailman.3561.1248307942.8015.python-l...@python.org,
Gabriel Genellina gagsl-...@yahoo.com.ar wrote:
Oops. My bad. I did in fact have this line of code before calls to form:
form = cgi.FieldStorage()
I changed the except command from pass to print sys.exc_info() as per
your suggestion. Still, however, the form just renews itself without
offering any information whatsoever. You can see this
On Jul 23, 11:53 am, Paul McGuire pt...@austin.rr.com wrote:
On Jul 22, 5:43 pm, Filip pink...@gmail.com wrote:
# Needs re.IGNORECASE, and can have tag attributes, such as BR
CLEAR=ALL
line_break_re = re.compile('br\/?', re.UNICODE)
Just in case somebody actually uses valid XHTML :-) it
In article 056f629b-aa63-458a-ae16-ac40a759e...@h11g2000yqb.googlegroups.com,
Shai s...@platonix.com wrote:
class DocInherit(object):
Docstring inheriting method descriptor
The class itself is also used as a decorator
Nice! Maybe stick this on the Cookbook?
--
Aahz
ryles ryle...@gmail.com (r) wrote:
r On Jul 25, 8:57 am, Piet van Oostrum p...@cs.uu.nl wrote:
ryles ryle...@gmail.com (r) wrote:
r According tohttp://www.python.org/doc/essays/packages.html:
r The import statement first tests whether the item is defined in the
r package; if not, it assumes
hello
i thought that python automatically compiled pyc files after a module is
successfully imported. what could prevent this happening?
Python 2.6.1 (r261:67515, Apr 12 2009, 03:51:25)
[GCC 4.3.2] on linux2
Type help, copyright, credits or license for more information.
import os
On Jul 26, 5:22 pm, Baz Walter baz...@ftml.net wrote:
hello
i thought that python automatically compiled pyc files after a module is
successfully imported. what could prevent this happening?
Python 2.6.1 (r261:67515, Apr 12 2009, 03:51:25)
[GCC 4.3.2] on linux2
Type help, copyright,
In article
148abf0f-c9e4-4156-8f16-e4e5615d3...@s6g2000vbp.googlegroups.com,
Paul Barry pauljbar...@gmail.com wrote:
host = '127.0.0.1' # Bind to all interfaces
This threw me off the track for a little while. The comment is wrong!
You're not binding to all interfaces, you're
Baz Walter wrote:
i thought that python automatically compiled pyc files after a module is
successfully imported. what could prevent this happening?
Python 2.6.1 (r261:67515, Apr 12 2009, 03:51:25)
[GCC 4.3.2] on linux2
Type help, copyright, credits or license for more information.
Sorry for not providing enough information - and Rhodri, for sending
my second message I used the GMX webmail client rather than my usual
Linux client as I was testing it on windows. That must have screwed it
up, I need to download Thunderbird on Mozzila.
The thing that was messing it up was that
On Jul 25, 8:31 am, Gabriel Genellina gagsl-...@yahoo.com.ar
wrote:
En Fri, 24 Jul 2009 17:52:47 -0300, Qauzzix qauz...@gmail.com escribió:
Since I have been usingdiato make my UML diagrams. I also found an
util named dia2code that generates python code fromdiadiagram. Now
that I have that
On Jul 26, 1:13 pm, Tom tom.su...@gmx.com wrote:
The thing that was messing it up was that the endlines are handled
differently on each each OS, so I changed the code to strip the
endlines to be:
if os.name == nt:
s = sauce.rstrip(\r\n)
else:
s = sauce.replace(\n, )
In article mailman.3714.1248551656.8015.python-l...@python.org,
Tom tom.su...@gmx.com wrote:
I have an annoying problem. While I mainly use Linux when I distribute
this program to friends and on the internet, it'll get used on Windows.
So, I tested my python program on my Windows Vista dual
I have a predefined set of members, some of which are optional.
Having optional fields is also a good reason.
What is the use of T_OBJECT_EX vs T_OBJECT in PyMemberDef then?
Right - this works for optional objects. However, it can't possibly
work for any of the other fields.
I would
Hi all, One of my cousin suggested me to do a IText
PDF converter for python. Actually I heard that there is
no separate IText converter either we have to go for jython or GCJ with
wrapper. Instead of wrapping, my plan is to create a separate module with
Python and I am thinking of
On Jul 23, 11:29 pm, Nick Craig-Wood n...@craig-wood.com wrote:
The syntax would be something like:
def work():
showstatus(building)
r = yield runshell(make)
showstatus(installing)
r = yield runshell(make install)
showstatus(Success)
mygui.startwork(work)
#
Beni Cherniavsky wrote:
On Jul 22, 9:36 am, Hendrik van Rooyen hend...@microcorp.co.za
wrote:
On Tuesday 21 July 2009 15:49:59 Inky 788 wrote:
My guess is that it was probably for optimization reasons long ago.
I've never heard a *good* reason why Python needs both.
The good reason is the
Apologies for the long subject line, here it is again:
Pep 342 (val = yield MyGenerator(foo)), synchronous os.system() that
doesn't block gui event loops
On Jul 21, 7:48 pm, John Nagle na...@animats.com wrote:
The idea:
To run functions that execute a series of system commands without
This doesn't mean they're on the same level - in fact, if you read carefully
you'll see my original post said as much: python attracted average
programmers; php attracted mediocre programmers and even some
non-programmers, which means that php is clearly a lesser language than
python.
I'm a
Peter Otten wrote:
You did not set the PYTHONDONTWRITEBYTECODE environment variable in a former
life, or did you?
thanks peter
no i didn't, but i've just discovered a script in /etc/profile.d that
did. now i'll have to try to find out how that script got in there :-|
--
Referring to this article:
http://math-blog.com/2009/07/20/complex-algorithm-research-and-development-harder-than-many-think/
The author, who is specifically looking for math-related functions, writes:
The dream algorithm RD tool would be similar to Matlab or Mathematica
but could be compiled to
Martin v. Löwis wrote:
I have a predefined set of members, some of which are optional.
Having optional fields is also a good reason.
What is the use of T_OBJECT_EX vs T_OBJECT in PyMemberDef then?
Right - this works for optional objects. However, it can't possibly
work for any of the
On Jul 26, 12:53 pm, Roy Smith r...@panix.com wrote:
In article
148abf0f-c9e4-4156-8f16-e4e5615d3...@s6g2000vbp.googlegroups.com,
Paul Barry pauljbar...@gmail.com wrote:
host = '127.0.0.1' # Bind to all interfaces
This threw me off the track for a little while. The comment is
On Jul 26, 11:07 am, MRAB pyt...@mrabarnett.plus.com wrote:
Paul Barry wrote:
I'm trying to get one of the examples from Foundation of Python
Network Programming to work. Specifically this is the UDP example
from Ch 3. First there is the server:
#!/usr/bin/env python
# UDP Echo
Does anyknow know how to do this? The reason I'm asking is because I'm
trying to make a mini-programming language for fun, and need to work
with variables.
The user types 'set NAME DATA ' or whatever else the variable is
going to be called/contain.
I have:
def variablework(varname, varset):
In article
2f578124-1ae3-45a5-a0c9-b8b05c0b5...@p23g2000vbl.googlegroups.com,
Paul Barry pauljbar...@gmail.com wrote:
In this case, I think he's trying to illustrate how the UDP example
compares to the TCP example from the previous section, which is why he
choose to keep the methods the
David Robinow wrote:
This doesn't mean they're on the same level - in fact, if you read carefully
you'll see my original post said as much: python attracted average
programmers; php attracted mediocre programmers and even some
non-programmers, which means that php is clearly a lesser language
(Even if it so happens sauce
will only ever have LFs at the end, it's still better to use the
method that is closest to your intended meaning.)
Oh, you're right. I'll change that now. I suppose removing all
endlines will be better, incase, somehow, endlines in the middle of
the line arrises.
In article h4gnmr$8c...@news.eternal-september.org,
Raffael Cavallaro raffaelcavall...@pas.espam.s.il.vous.plait.mac.com
wrote:
php is clearly a lesser language than python.
I'm as much of a Python bigot as anybody. Likewise, I put down php for all
the sorts of theoretical reasons people
En Sun, 26 Jul 2009 12:44:02 -0300, Aahz a...@pythoncraft.com escribió:
In article mailman.3648.1248429993.8015.python-l...@python.org,
Gabriel Genellina gagsl-...@yahoo.com.ar wrote:
En Thu, 23 Jul 2009 21:27:35 -0300, Aahz a...@pythoncraft.com
escribió:
In article
I have a predefined set of members, some of which are optional.
Having optional fields is also a good reason.
What is the use of T_OBJECT_EX vs T_OBJECT in PyMemberDef then?
Right - this works for optional objects. However, it can't possibly
work for any of the other fields.
I have two
On 2009-07-26 17:04:23 -0400, Roy Smith r...@panix.com said:
One
needs to have a very highly developed sense of theoretical purity to look
down their noses at the language that drives one of the highest volume web
sites on the planet.
It's nothing to do with theoretical purity and everything
Hello, I'm new to Python (using it for two months) and I wonder how can I
comment the const. values with the doc-strings. I.e. if I have code:
FRACTION_MIN = 1
FRACTION_MAX = 10
class Fraction(collections.MutableSequence):
'''Model a fraction with denominators.
It contains one ore more
On Sun, Jul 26, 2009 at 2:49 PM, Erwin Muellerdev...@deventm.org wrote:
Hello, I'm new to Python (using it for two months) and I wonder how can I
comment the const. values with the doc-strings. I.e. if I have code:
FRACTION_MIN = 1
FRACTION_MAX = 10
class Fraction(collections.MutableSequence):
Ah, thanks for that Dennis. I have a system already figured out where
the user manually pre-enters all the variables into a .py file, which
obviously isn't very efficient. The language isn't going to be used
much except by me, so I suppose I'll just work with that until I look
more into
I am trying to compile Python 2.6.2 on Mac OS X 10.5.7. I have Xcode
3.1.3 installed.
The error I got is below.
$ ./configure --prefix=/Users/me/python
checking for --with-universal-archs... 32-bit
checking MACHDEP... darwin
checking EXTRAPLATDIR... $(PLATMACDIRS)
checking machine type as
On Sun, 26 Jul 2009 14:31:06 +0100, Raffael Cavallaro
raffaelcavall...@pas.espam.s.il.vous.plait.mac.com wrote:
On 2009-07-26 09:16:39 -0400, a...@pythoncraft.com (Aahz) said:
There are plenty of expert C++
programmers who switched to Python;
plenty is an absolute term, not a relative
Chris Rebert:
Only modules, classes, and functions/methods can have docstrings
associated with them.
For anything else, you have to use comments; or you can mention them
in the docstrings of related things.
What about adding docstrings to other Python things, especially to
variables?
Bye,
Kevin schrieb:
I am trying to compile Python 2.6.2 on Mac OS X 10.5.7. I have Xcode
3.1.3 installed.
The error I got is below.
$ ./configure --prefix=/Users/me/python
Use a framework-build.
checking for --with-universal-archs... 32-bit
checking MACHDEP... darwin
checking EXTRAPLATDIR...
Chris Rebert schrieb:
On Sun, Jul 26, 2009 at 2:49 PM, Erwin Muellerdev...@deventm.org wrote:
Hello, I'm new to Python (using it for two months) and I wonder how can I
comment the const. values with the doc-strings. I.e. if I have code:
FRACTION_MIN = 1
FRACTION_MAX = 10
class
On Sun, 26 Jul 2009 15:07:08 -0700, Tom wrote:
Ah, thanks for that Dennis. I have a system already figured out where
the user manually pre-enters all the variables into a .py file, which
obviously isn't very efficient. The language isn't going to be used much
except by me, so I suppose I'll
On Sun, 26 Jul 2009 12:40:39 -0700, Paul Barry wrote:
On Jul 26, 12:53 pm, Roy Smith r...@panix.com wrote:
In article
148abf0f-c9e4-4156-8f16-e4e5615d3...@s6g2000vbp.googlegroups.com,
Paul Barry pauljbar...@gmail.com wrote:
host = '127.0.0.1' # Bind to all interfaces
This
On Sun, 26 Jul 2009 11:24:48 -0700, John Nagle wrote:
An interesting issue is Python objects, which are always mutable.
A dict of Python objects is allowed, but doesn't consider the contents
of the objects, just their identity (address). Only built-in types are
immutable; one cannot
On Sun, 26 Jul 2009 15:42:22 -0700, Bearophile wrote:
Chris Rebert:
Only modules, classes, and functions/methods can have docstrings
associated with them.
For anything else, you have to use comments; or you can mention them in
the docstrings of related things.
What about adding docstrings
On Mon, 27 Jul 2009 00:47:08 +0200, Diez B. Roggisch wrote:
Only modules, classes, and functions/methods can have docstrings
associated with them.
For anything else, you have to use comments; or you can mention them in
the docstrings of related things.
While this is technically true,
On Sun, 26 Jul 2009 09:31:06 -0400, Raffael Cavallaro wrote:
On 2009-07-26 09:16:39 -0400, a...@pythoncraft.com (Aahz) said:
There are plenty of expert C++
programmers who switched to Python;
plenty is an absolute term, not a relative term. I sincerely doubt
that the majority of python
On Jul 23, 3:53 am, Paul McGuire pt...@austin.rr.com wrote:
# You should use raw string literals throughout, as in:
# blah_re = re.compile(r'sljdflsflds')
# (note the leading r before the string literal). raw string
literals
# really help keep your re expressions clean, so that you don't
In article 2a408da6-af57-45d0-a75f-4cbe384bb...@s15g2000yqs.googlegroups.com,
Michal Kwiatkowski constant.b...@gmail.com wrote:
On Jul 25, 10:00=A0pm, Jason Tackaberry t...@urandom.ca wrote:
On Sat, 2009-07-25 at 11:30 -0700, Michal Kwiatkowski wrote:
Is there a way to tell if a generator has
Michal Kwiatkowski wrote:
The thing is I don't need the next item. I need to know if the
generator has stopped without invoking it.
Write a one-ahead iterator class, which I have posted before, that sets
.exhausted to True when next fails.
tjr
--
Mark Lawrence:
If my sleuthing is correct the problem is with these lines
ilow *= self-itemSize;
ihigh *= self-itemSize;
in GapBuffer_slice being computed before ilow and ihigh are compared to
anything.
This particular bug was because ihigh is the maximum 32 bit integer
2147483647 so
On Mon, Jul 20, 2009 at 5:57 AM, casebashwalkr...@gmail.com wrote:
Hi,
I have searched this list and found out that Python doesn't have a
mutable string class (it had an inefficient one, but this was removed
in 3.0). Are there any libraries outside the core that offer this?
It depends on how
Mark Dickinson wrote:
Since the 'and' and 'or' already return objects (and objects
evaluate to true or false), then 'xor' should behave likewise, IMO.
I expect that would be the case if it were ever added to the
language.
I'm not so sure. Did you ever wonder why the any() and all()
William Dode':
I updated the script (python, c and java) with your unrolled version
+ somes litle thinks.
[...]
c 1.85s
gcj 2.15s
java 2.8s
python2.5 + psyco 3.1s
unladen-2009Q2 145s (2m45)
python2.5 254s (4m14s)
python3.1 300s (5m)
ironpython1.1.1 680s (11m20)
Sorry for being late, I
Terry Reedy wrote:
In Math and Python, abc means ab and bc, not (ab)c or a(bc).
!= is a comparison operator like ,
Although Python extends the chaining principle to
!=, this is somewhat questionable, because
a b and b c implies a c, but a != b and
b != c does not imply a != c.
I'm not
Michal Kwiatkowski wrote:
The first generator isn't finished, it yielded 1 and None. Second one
is exhausted after yielding a single value (1). The problem is that,
under Python 2.4 or 2.3 both invocations will generate the same trace
output.
This seems to be a deficiency in the trace
On Sun, 26 Jul 2009 20:10:00 -0400, Terry Reedy wrote:
Michal Kwiatkowski wrote:
The thing is I don't need the next item. I need to know if the
generator has stopped without invoking it.
Write a one-ahead iterator class, which I have posted before, that sets
.exhausted to True when next
On 2009-07-26 07:04, Helvin wrote:
C:\Qt\VTKbin7\Wrapping\Pythonpython setup.py install
Traceback (most recent call last):
File setup.py, line 138, inmodule
raise ERROR: Must specify BUILD_TYPE=config-name on command
line.
TypeError: exceptions must be classes or instances, not str
Is
On 2009-07-26 18:23, Steven D'Aprano wrote:
On Mon, 27 Jul 2009 00:47:08 +0200, Diez B. Roggisch wrote:
Only modules, classes, and functions/methods can have docstrings
associated with them.
For anything else, you have to use comments; or you can mention them in
the docstrings of related
To the best of my recollection, the len() function only applies to
container objects; i. e. tuples, lists, strings, etc. an integer
object is not a container, thus one receives an error when sending an
int as an argument for len().
--
http://mail.python.org/mailman/listinfo/python-list
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue481171
___
___
New submission from Ezio Melotti ezio.melo...@gmail.com:
The documentation about the __future__ features [1] only lists the
features available for that particular version, without specifying when
they were added and their effects.
It would be nice to have a table with |feature|version
Mark Dickinson dicki...@gmail.com added the comment:
Sounds good to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6567
___
___
Changes by Ori Avtalion o...@avtalion.name:
--
nosy: +salty-horse
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1820
___
___
Python-bugs-list
1 - 100 of 143 matches
Mail list logo