On Oct 26, 2005, at 20:02, Evan Jones wrote:
> In the process of doing this, I came across a comment mentioning that
> it would be desirable to separate the parser. Is there any interest in
> doing this? I now have a vague idea about how to do this. Of course,
> there is no point in ma
t for Unicode, Longs, Floats, and
Complex), but it works well enough to get the AST from a few simple
strings, which is what I wanted.
Evan Jones
--
Evan Jones
http://evanjones.ca/
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.
on both my Linux system and
my Mac. I've also attached a patch that adds this test case to
test_minidom.py.
Thanks,
Evan Jones
--
Evan Jones
http://evanjones.ca/
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org
ituations.
A solution for this would be to add an argument named final to
the decode and read methods that tells the decoder that the
stream has ended and the remaining buffered bytes have to be
handled now.
This functionality is provided by a flush() method on similar objects,
such as the
ies to str.decode(). Any other
attempt to create non-characters, such as unichr( 0x ), *should*
raise an exception because clearly the programmer is making a mistake.
Other than that: +1 on fixing this case.
Cool!
Evan Jones
___
Python-Dev maili
y allows
the removal of these characters. (See C10 in Section3.2, Conformance
Requirements.)
My interpretation of the specification means that Python should
silently remove the character, resulting in a zero length Unicode
string. Similarly, both of the following lines sho
arise when it is reviewed. I am still lurking on Python-Dev, and I will
strive to correct any defects ASAP. A few users have contacted me
privately and have tested the patch, so it works for a few people at
least.
Evan Jones
___
Python-Dev mailing
ficant
performance difference, it could be worth it.
http://java.sun.com/j2se/1.5.0/docs/api/java/util/
ArrayList.html#ensureCapacity(int)
http://www.sgi.com/tech/stl/Vector.html#4
Evan Jones
___
Python-Dev mailing list
Python-Dev@python.org
http
still relies on the
invalid APIs. The only problem is that it is really hard to determine
whether some code *does* violate the API usage.
Great. Please ignore the patch on SourceForge for a little while. I'll
produce a "revision 3" this weekend, without the compatibility ha
zing them.
Well, it would also be useful to find out what code is calling the
system malloc. This would make it easy to examine the code and see if
it should be calling obmalloc or the system malloc. Any good ideas for
easily obtaining this information? I imagine that some prof
hese are using it to allocate some sort
of array or string, so it likely *should* go through the system malloc.
Gfeller, any idea if you are using any of the modules on this list? If
so, it would be pretty easy to try converting them to call the obmalloc
functions instead, and see how that affects th
PyObject_Free everywhere they had a
PyMem_Del/DEL/FREE call.
Is it guaranteed that extension modules will be binary compatible with
future Python releases? I didn't think this was the case.
Thanks for the feedback,
Evan Jones
___
Python-Dev mailing li
7;ve
included links to SourceForge and the previous thread.
Thank you,
Evan Jones
Previous thread:
http://mail.python.org/pipermail/python-dev/2005-January/051255.html
Patch location:
http://sourceforge.net/tracker/index.php?
func=detail&aid=1123430&gr
of leveraging multiple
processor environments is that multithreading seems to be where the big
performance increases will be in the next few years. I am currently
using Python for some relatively large simulations, so performance is
important to me.
Evan Jones
___
nt weirdness happens, it
just corrupts the application, not the VM. However, in Python, this
could actually corrupt the interpreter itself, crashing the entire
thing with a very ungraceful Segmentation Fault or something similar.
Evan Jones
___
Pyth
uldn't want to. Writing threaded code is especially easy (a
relative stmt, not absolute) in Python because of it.
Right, because currently Python switches threads on a granularity of
opcodes, which gives you this serialization with the cost of never
having parallel execution.
Evan Jones
_
reference
counting (which would have to grow atomic increment/decrement).
Wouldn't it be up to the programmer to ensure that accesses to shared
objects, like containers, are serialized? For example, with Java's
collections, there are both synchronized and u
this is a problem? I'm curious about how much work it would be to
allow concurrent execution of Python code.
Evan Jones
Note: One of the reasons I am asking is that my memory allocator patch
is that it changes the current allocator from "sort of" thread safe to
obviously unsafe.
d be mentioned in the introductory comments as well.
This is one of those rough edges I mentioned before. If there is some
concensus that these changes should be accepted, then I will need to
severely edit the comments at the beginning of obmalloc.c.
Thanks for your feedback,
Evan Jones
_
this. Does Python's
cyclic garbage collector currently do this? If so, I could hook this
"management" stuff on to its calls to gc.collect()
Evan Jones
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/l
rformance of programs that cyclically allocate
and free large amounts of memory. This amount should be "self-tuned" to
the application.
Thank you for your feedback,
Evan Jones
python-allocator.diff
Description: Binary data
___
Python-Dev maili
21 matches
Mail list logo