than calling them
expressions and linking to CPython's Grammar file?
--
Adam Olsen, aka Rhamphoryncus
[0] Colors pulled off the top of my head
--
http://mail.python.org/mailman/listinfo/python-list
the all important one, can I get it
in to python core? 0.5 wink
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo/python-list
and event notifiers. Otherwise I'd just use blocking calls
in real threads, or maybe just twisted, and not bother creating
anything new, ya know?
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo/python-list
without that problem.
* I've no idea what will happen when the interpreter exits, but I
don't imagine it would matter much for most uses.
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 2, 10:32 pm, Graham Dumpleton [EMAIL PROTECTED]
wrote:
The multi interpreter feature has some limitations, but if you know
what you are doing and your application can be run within those
limitations then it works fine.
I've been wondering about this for a while. Given the severe
On Feb 23, 11:39 am, Nicola Musatti [EMAIL PROTECTED] wrote:
Paul Rubin wrote:
Nicola Musatti [EMAIL PROTECTED] writes:
a = [f(x) + g(y) for x,y in izip(m1, m2) if h(x,y).frob() == 7]
[...]
There you replace one line of code with 40+ lines to get around the
absence of GC. Sounds
On Apr 1, 1:29 am, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
In my application I am trying to access(read) a DB thru a thread while
my main thread is adding data to it and it gives following error(s)
bsddb._db.DBRunRecoveryError: (-30974, 'DB_RUNRECOVERY: Fatal error,
run database recovery
On Apr 11, 10:24 am, [EMAIL PROTECTED] wrote:
This question was posed to me today. Given a C/C++ program we can clearly
embed a Python interpreter in it. Is it possible to fire up multiple
interpreters in multiple threads? For example:
C++ main
thread 1
On Apr 12, 6:58 pm, Steve Holden [EMAIL PROTECTED] wrote:
Paul Rubin wrote:
Steve Holden [EMAIL PROTECTED] writes:
I believe you are making surmises outside your range of competence
there. While your faith in the developers is touching, the garbage
collection scheme is something that has
On Apr 12, 2:02 pm, sturlamolden [EMAIL PROTECTED] wrote:
On Apr 12, 7:05 pm, sturlamolden [EMAIL PROTECTED] wrote:
In theory, a GIL private to each (sub)interpreter would make Python
more scalable. The current GIL behaves like the BKL in earlier Linux
kernels. However, some third-party
On Apr 16, 6:56 am, Aaron Watters [EMAIL PROTECTED] wrote:
I don't get it. It ain't broke. Don't fix it.
So how would you have done the old-style class to new-style class
transition?
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 16, 10:40 am, Aaron Watters [EMAIL PROTECTED] wrote:
On Apr 16, 12:27 pm, Rhamphoryncus [EMAIL PROTECTED] wrote:
On Apr 16, 6:56 am, Aaron Watters [EMAIL PROTECTED] wrote:
I don't get it. It ain't broke. Don't fix it.
So how would you have done the old-style class to new-style
On Apr 16, 12:10 pm, Aaron Watters [EMAIL PROTECTED] wrote:
On Apr 16, 1:42 pm, Rhamphoryncus [EMAIL PROTECTED] wrote:
The only reason to not make the
changes is that old, crufty, unmaintained libraries applications
might depend on them somehow. If that's more important to you, what
On Apr 16, 12:52 pm, Aaron Watters [EMAIL PROTECTED] wrote:
On Apr 16, 2:33 pm, Rhamphoryncus [EMAIL PROTECTED] wrote:
The point is, you can't have it both ways. Either you evolve the
language and break things, or you keep it static and nothing breaks.
I disagree. You can add lots
On Apr 17, 9:19 am, sturlamolden [EMAIL PROTECTED] wrote:
On 17 Apr, 10:25, Martin v. Löwis [EMAIL PROTECTED] wrote:
help progress at all. I think neither was the case in this thread -
the guy claimed that he actually did something about the GIL, and
now we are all waiting for him to also
On Apr 17, 7:40 am, Steve Holden [EMAIL PROTECTED] wrote:
I'd love to be wrong about that, but the GIL *has* been the subject of
extensive efforts to kill it over the last five years, and it has
survived despite the best efforts of the developers.
Yo.
On Apr 17, 11:05 am, sturlamolden [EMAIL PROTECTED] wrote:
On Apr 17, 6:03 pm, Rhamphoryncus [EMAIL PROTECTED] wrote:
Interesting. Windows specific, but there's other ways to do the same
thing more portably.
I believe you can compile Python as a shared object (.so) on Linux as
well
On Apr 18, 4:30 am, Nick Craig-Wood [EMAIL PROTECTED] wrote:
Rhamphoryncus [EMAIL PROTECTED] wrote:
On Apr 17, 7:40 am, Steve Holden [EMAIL PROTECTED] wrote:
I'd love to be wrong about that, but the GIL *has* been the subject of
extensive efforts to kill it over the last five years
On May 3, 4:31 pm, Thomas Dybdahl Ahle [EMAIL PROTECTED] wrote:
On Sat, 2008-05-03 at 21:37 +, Ivan Illarionov wrote:
On Sat, 03 May 2008 20:44:19 +0200, Szabolcs Horvát wrote:
Arnaud Delobelle wrote:
sum() works for any sequence of objects with an __add__ method, not
just
On May 6, 1:31 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Tue, 6 May 2008 11:52:10 +0800, Yuan HOng [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
It seems to me that rather than allowing this to happen, comparasion
between the two should either be made correct (by
On May 7, 5:00 am, [EMAIL PROTECTED] wrote:
Hi Guys,
during testing of my project on FreeBSD I've discovered stange
'feature' of time.sleep(). It works if single thread is running, but
when multi-threaded, the SIGINT signal seems not to be handled in same
way.
I've found three discussion
On May 8, 3:09 pm, Terry Reedy [EMAIL PROTECTED] wrote:
Szabolcs Horvát [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]| Gabriel Genellina wrote:
|
| Python doesn't require __add__ to be associative, so this should not be
used as a general sum replacement.
|
| It does not
On May 9, 1:53 pm, Daniel Marcel Eichler [EMAIL PROTECTED] wrote:
Am Freitag 09 Mai 2008 10:19:45 schrieb Bruno Desthuilliers:
very often sees do-nothing catch-all try/catch blocks in Java -
which is way worse than just letting the exception propagate. I
find all this totally pointless,
On May 11, 2:13 am, Filip Štědronský [EMAIL PROTECTED] wrote:
The main problem are references to objects within a module, because
we can NEVER be sure there aren't any, even though we cleaned up
everything, that's just a consequence of Python nature. We can keep
the old objects referenced and
On May 11, 10:16 am, skunkwerk [EMAIL PROTECTED] wrote:
On May 10, 1:31 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Fri, 9 May 2008 08:40:38 -0700 (PDT),skunkwerk[EMAIL PROTECTED]
declaimed the following in comp.lang.python:
Coming in late...
On May 9, 12:12 am, John
On May 12, 1:31 pm, skunkwerk [EMAIL PROTECTED] wrote:
On May 12, 1:40 am, Rhamphoryncus [EMAIL PROTECTED] wrote:
On May 11, 10:16 am,skunkwerk[EMAIL PROTECTED] wrote:
On May 10, 1:31 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Fri, 9 May 2008 08:40:38 -0700 (PDT),skunkwerk
On Sep 21, 4:39 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
I have a class which is not intended to be instantiated. Instead of using
the class to creating an instance and then operate on it, I use the class
directly, with classmethods. Essentially, the class is used as a
On Sep 22, 7:13 pm, process [EMAIL PROTECTED] wrote:
Why doesn't Python optimize tailcalls? Are there plans for it?
I know GvR dislikes some of the functional additions like reduce and
Python is supposedly about one preferrable way of doing things but
not being able to use recursion properly
On Oct 22, 10:32 am, Andy [EMAIL PROTECTED] wrote:
Dear Python dev community,
I'm CTO at a small software company that makes music visualization
software (you can check us out atwww.soundspectrum.com). About two
years ago we went with decision to use embedded python in a couple of
our new
On Oct 22, 7:04 pm, Andy [EMAIL PROTECTED] wrote:
What you describe, truly independent interpreters, is not threading at
all: it is processes, emulated at the application level, with all the
memory cost and none of the OS protections. True threading would
involve sharing most objects.
On Oct 22, 10:31 pm, Andy [EMAIL PROTECTED] wrote:
You seem confused. PEP 3121 is for isolated interpreters (ie emulated
processes), not threading.
Please reread my points--inherently isolated interpreters (ie. the top
level object) are indirectly linked to thread independence. I don't
On Oct 23, 11:30 am, Glenn Linderman [EMAIL PROTECTED] wrote:
On approximately 10/23/2008 12:24 AM, came the following characters from
the keyboard of Christian Heimes:
Andy wrote:
2) Barriers to free threading. As Jesse describes, this is simply
just the GIL being in place, but of
On Oct 24, 1:02 pm, Glenn Linderman [EMAIL PROTECTED] wrote:
On approximately 10/24/2008 8:42 AM, came the following characters from
the keyboard of Andy O'Meara:
Glenn, great post and points!
Thanks. I need to admit here that while I've got a fair bit of
professional programming
On Oct 24, 2:59 pm, Glenn Linderman [EMAIL PROTECTED] wrote:
On approximately 10/24/2008 1:09 PM, came the following characters from
the keyboard of Rhamphoryncus:
PyE: objects are reclassified as shareable or non-shareable, many
types are now only allowed to be shareable. A module and its
On Oct 24, 3:02 pm, Glenn Linderman [EMAIL PROTECTED] wrote:
On approximately 10/23/2008 2:24 PM, came the following characters from the
keyboard of Rhamphoryncus:
On Oct 23, 11:30 am, Glenn Linderman [EMAIL PROTECTED] wrote:
On approximately 10/23/2008 12:24 AM, came the following
On Oct 25, 12:29 am, greg [EMAIL PROTECTED] wrote:
Rhamphoryncus wrote:
A list
is not shareable, so it can only be used within the monitor it's
created within, but the list type object is shareable.
Type objects contain dicts, which allow arbitrary values
to be stored in them. What
On Oct 26, 6:57 pm, Andy O'Meara [EMAIL PROTECTED] wrote:
Grrr... I posted a ton of lengthy replies to you and other recent
posts here using Google and none of them made it, argh. Poof. There's
nothing that fires more up more than lost work, so I'll have to
revert short and simple answers for
On Oct 28, 9:30 am, Andy O'Meara [EMAIL PROTECTED] wrote:
On Oct 25, 9:46 am, M.-A. Lemburg [EMAIL PROTECTED] wrote:
These discussion pop up every year or so and I think that most of them
are not really all that necessary, since the GIL isn't all that bad.
Thing is, if the topic keeps
On Oct 29, 7:20 am, Paul Boddie [EMAIL PROTECTED] wrote:
On 28 Okt, 21:03, Rhamphoryncus [EMAIL PROTECTED] wrote:
* get a short-term bodge that works, like hacking the 3rd party
library to use your shared-memory allocator. Should be far less work
than hacking all of CPython.
Did anyone
On Oct 30, 8:23 pm, Patrick Stinson [EMAIL PROTECTED]
wrote:
Speaking of the big picture, is this how it normally works when
someone says Here's some code and a problem and I'm willing to pay
for a solution? I've never really walked that path with a project of
this complexity (I guess it's the
On May 18, 9:05 am, Diez B. Roggisch [EMAIL PROTECTED] wrote:
alan schrieb:
This ignores CTRL-C on every platform I've tested:
python -c import threading; threading.Event().wait()
^C^C^C^C
It looks to me like all signals are masked before entering wait(). Can
someone familiar with
On May 19, 11:31 am, Chris Mellon [EMAIL PROTECTED] wrote:
On Mon, May 19, 2008 at 11:36 AM, Roger Heathcote
Fair point, but for sub processes that need to be in close contact with the
original app, or very small functions that you'd like 100s or 1000s of it
seems like a kludge having to
On May 20, 12:09 pm, Terry Reedy [EMAIL PROTECTED] wrote:
Intern() is gone in 3.0
But not gone far:
import sys
sys.intern
built-in function intern
--
http://mail.python.org/mailman/listinfo/python-list
On May 28, 1:14 pm, [EMAIL PROTECTED] wrote:
Hi,
I'm trying to work out some strange (to me) behaviour that I see when
running a python script in two different ways (I've inherited some
code that needs to be maintained and integrated with another lump of
code). The sample script is:
#
On May 30, 2:40 pm, [EMAIL PROTECTED] wrote:
Hi, everybody!
I wrote a useful class ThreadPoolingMixIn which can be used to create
fast thread-based servers. This mix-in works much faster than
ThreadingMixIn because it doesn't create a new thread on each request.
Do you have any benchmarks
On May 31, 1:40 pm, Giampaolo Rodola' [EMAIL PROTECTED] wrote:
On 30 Mag, 22:40, [EMAIL PROTECTED] wrote:
Hi, everybody!
I wrote a useful class ThreadPoolingMixIn which can be used to create
fast thread-based servers. This mix-in works much faster than
ThreadingMixIn because it
On Jun 6, 12:44 pm, The Pythonista [EMAIL PROTECTED] wrote:
It's always been my understanding that you can't forcibly kill a thread
in Python (at least not in a portable way). The best you can do is
politely ask it to die, IIRC.
Inherently, the best you can do in most languages is ask them
On Jun 8, 9:55 am, [EMAIL PROTECTED] wrote:
I'd like to take the python-safethread code out for a spin, but I'm not sure
where to start. I downloaded the latest diff:
http://python-safethread.googlecode.com/files/safethread-bzr-36020.diff
checked out Python 3.0 from the bzr mirror, then
On Jun 9, 5:33 am, Antoon Pardon [EMAIL PROTECTED] wrote:
On 2008-06-07, Rhamphoryncus [EMAIL PROTECTED] wrote:
On Jun 6, 12:44 pm, The Pythonista [EMAIL PROTECTED] wrote:
It's always been my understanding that you can't forcibly kill a thread
in Python (at least not in a portable way
On Jun 9, 2:52 pm, Fuzzyman [EMAIL PROTECTED] wrote:
On Jun 9, 9:20 pm, Rhamphoryncus [EMAIL PROTECTED] wrote:
On Jun 9, 5:33 am, Antoon Pardon [EMAIL PROTECTED] wrote:
On 2008-06-07, Rhamphoryncus [EMAIL PROTECTED] wrote:
On Jun 6, 12:44 pm, The Pythonista [EMAIL PROTECTED] wrote
On Jun 10, 1:55 am, Antoon Pardon [EMAIL PROTECTED] wrote:
On 2008-06-09, Rhamphoryncus [EMAIL PROTECTED] wrote:
On Jun 9, 5:33 am, Antoon Pardon [EMAIL PROTECTED] wrote:
On 2008-06-07, Rhamphoryncus [EMAIL PROTECTED] wrote:
On Jun 6, 12:44 pm, The Pythonista [EMAIL PROTECTED] wrote
On Jun 10, 8:15 pm, George Sakkis [EMAIL PROTECTED] wrote:
I'm baffled with a situation that involves:
1) an instance of some class that defines __del__,
2) a thread which is created, started and referenced by that instance,
and
3) a weakref proxy to the instance that is passed to the thread
On Jun 10, 3:41 pm, Fuzzyman [EMAIL PROTECTED] wrote:
On Jun 10, 2:03 am, Rhamphoryncus [EMAIL PROTECTED] wrote:
So how does .NET deal with the sys.stdout corruption? Does it?
That has never been an issue for us.
Of course. It's far more likely to hit the underlying blocked I/O
than
Why not use a normal Queue, put a dummy value (such as None) in when
you're producer has finished, and have the main thread use the normal
Thread.join() method on all your child threads?
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 11, 7:56 am, Fuzzyman [EMAIL PROTECTED] wrote:
On Jun 11, 6:56 am, Rhamphoryncus [EMAIL PROTECTED] wrote:
On Jun 10, 3:41 pm, Fuzzyman [EMAIL PROTECTED] wrote:
On Jun 10, 2:03 am, Rhamphoryncus [EMAIL PROTECTED] wrote:
How does that protect code like this?
f = open('somefile
On Jun 11, 6:00 am, George Sakkis [EMAIL PROTECTED] wrote:
On Jun 11, 1:59 am, Rhamphoryncus [EMAIL PROTECTED] wrote:
Why not use a normal Queue, put a dummy value (such as None) in when
you're producer has finished, and have the main thread use the normal
Thread.join() method on all your
On Jun 11, 10:43 am, George Sakkis [EMAIL PROTECTED] wrote:
On Jun 11, 1:40 am, Rhamphoryncus [EMAIL PROTECTED] wrote:
The trick here is that calling proxy.sleep(0.01) first gets a strong
reference to the Mystery instance, then holds that strong reference
until it returns.
Ah
On Jun 11, 1:17 pm, Fuzzyman [EMAIL PROTECTED] wrote:
On Jun 11, 6:49 pm, Rhamphoryncus [EMAIL PROTECTED] wrote:
On Jun 11, 7:56 am, Fuzzyman [EMAIL PROTECTED] wrote:
On Jun 11, 6:56 am, Rhamphoryncus [EMAIL PROTECTED] wrote:
I'm not saying it can't be made to work in your specific case
On Jun 11, 2:15 pm, George Sakkis [EMAIL PROTECTED] wrote:
On Jun 11, 2:01 pm, Rhamphoryncus [EMAIL PROTECTED] wrote:
On Jun 11, 10:43 am, George Sakkis [EMAIL PROTECTED] wrote:
On Jun 11, 1:40 am, Rhamphoryncus [EMAIL PROTECTED] wrote:
The trick here is that calling proxy.sleep(0.01
On Jun 13, 10:41 am, Dan Stromberg [EMAIL PROTECTED] wrote:
I wrote a script(1) replacement in python (http://stromberg.dnsalias.org/
~dstromberg/pypty/), but I'm encountering a problem in it.
I think I know the solution to the problem, but I'd've thought python was
high level enough that
On Jun 12, 11:42 pm, Alexnb [EMAIL PROTECTED] wrote:
I am wondering what is the best way to create a timer, like an alarm, once it
reaches a time, it triggers an event. I have a way of doing this but it
seems like it isn't good at all. If it helps at all I am using a Tkinter,
but that probably
On Jun 15, 1:06 pm, Dan Stromberg [EMAIL PROTECTED] wrote:
On Sat, 14 Jun 2008 10:04:15 -0700, Rhamphoryncus wrote:
On Jun 13, 10:41 am, Dan Stromberg [EMAIL PROTECTED] wrote:
I wrote a script(1) replacement in python
(http://stromberg.dnsalias.org/~dstromberg/pypty/), but I'm
On Jun 19, 11:09 pm, Brendon Costa [EMAIL PROTECTED] wrote:
If only the main thread can receive KeyboardInterrupt, is there any
reason why you couldn't move the functionality of the Read thread into
the main thread? It looks like it's not doing any work, just waiting
for the Proc thread to
characteristics. Get them confused or attempt to over-
generalize and you will be bitten.
[1] Math/crypto has some exceptions. Stop mentally poking holes in my
argument. :)
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 12, 1:37 am, [EMAIL PROTECTED] wrote:
On Jan 11, 8:04 pm, Paul Rubin http://[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] writes:
Could you:
lockerA= Locker( listA, listB )
lockerA.op( listB.reverse )
lockerA.op( listA.pop )
Where lockerA ops acquire the locks on all its
methods, no methods at all, change the arguments, etc. Although len()
may seem simple, many others are not so simple.
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 29, 2:40 pm, kj [EMAIL PROTECTED] wrote:
Yet another noob question...
Is there a way to mimic C's static variables in Python? Or something
like it? The idea is to equip a given function with a set of
constants that belong only to it, so as not to clutter the global
namespace with
On Jul 29, 10:23 pm, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Tue, 29 Jul 2008 13:13:51 -0300, Magnus Schuster
[EMAIL PROTECTED] escribi :
Hello,
I have written the following small proxy class which I expect to pass all
function calls to the 'original' object:
--- BEGIN ---
On Jul 31, 7:27 pm, Craig Allen [EMAIL PROTECTED] wrote:
I have followed the GIL debate in python for some time. I don't want
to get into the regular debate about if it should be gotten rid of
(though I am curious about the status of that for Python 3)...
personally I think I can do
On Aug 3, 5:43 pm, Allen [EMAIL PROTECTED] wrote:
Larry Bates wrote:
Allen wrote:
I'm in the process of developing an application that will use Python
for a scripting support. In light of the upcoming changes to Python,
I was wondering if it is possible to link to and use two different
On Aug 4, 11:46 am, Ethan Furman [EMAIL PROTECTED] wrote:
Mel wrote:
Ethan Furman wrote:
Emile van Sebille wrote:
Ethan Furman wrote:
-- d25._int = (1, 5)
Python considers names that start with a leading underscore as internal
or private, and that abuse is the burden of the
On Aug 13, 11:13 am, Cousson, Benoit [EMAIL PROTECTED] wrote:
There is no point of nested classes because nested classes _are not_
supported by python. They are simply an artifact of not actively
denying the syntax non-globally. I would fully support a change to the
language to actively
On Aug 14, 3:30 am, Mathieu Prevot [EMAIL PROTECTED] wrote:
2008/8/13 Parimala [EMAIL PROTECTED]:
Hello,
I am using python2.5.1 version to run my test scripts. I want to use
'threading' module in my tests. As a startup program, I had run the
following one.
importthreading
for sequences. If it's mutable,
use .append(). If it's immutable, build up in a mutable sequence,
then convert.
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo/python-list
, as
unused portions of a long-running program may get swapped out. Also
note that poking need only touch 1 byte per page, much cheaper than
copying the entire page (so long as the page is already loaded from
disk.)
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo
return bar
Obviously, bar can't be set until after the function object is
created.
Showing changes also matches the behaviour of globals, which is a good
thing IMO.
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo/python-list
approach to
solving these problems:
http://code.google.com/p/python-safethread/
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo/python-list
, and there's a lot that
can give good performance, but at this point they all offer poor to
moderate usability, none having good usability. The crux of the
multicore crisis is that lack of good usability.
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 12, 2:28 am, Martin Vilcans [EMAIL PROTECTED] wrote:
On Nov 10, 2007 12:48 AM, Rhamphoryncus [EMAIL PROTECTED] wrote:
On Nov 9, 1:45 pm, Terry Reedy [EMAIL PROTECTED] wrote:
2. If micro-locked Python ran, say, half as fast, then you can have a lot
of IPC (interprocess communition
. A refcounting error
is the first thing that comes to mind, although I can't see off hand
how this specific problem would come about.
Are you using threading at all?
Do you see any pattern to the types that have the bogus pointers?
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org
many times. I had no idea there was a direct solution.
Thanks!
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo/python-list
when the total number of active+dummy slots exceeds 2/3rds it will
trigger a resize (to the same size or even a smaller size!) so as to
clear out all the dummy slots (letting lookups finish sooner).
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo/python-list
value ≤ grapheme cluster ~
character ≤ syllable ≤ word ≤ sentence ≤ paragraph
12 in 123 allows you to handle bytes through scalar values the
same way, glossing over the implementation details (such as UTF-32 on
linux and UTF-16 on windows).
--
Adam Olsen, aka Rhamphoryncus
--
http
On Apr 13, 11:05 pm, Paul Rubin http://[EMAIL PROTECTED] wrote:
Rhamphoryncus [EMAIL PROTECTED] writes:
i = s.index(e) = s[i] = e
Then this algorithm is no longer guaranteed to work with strings.
It never worked correctly on unicode strings anyway (which becomes the
canonical string
On Apr 14, 11:59 am, Paul Rubin http://[EMAIL PROTECTED] wrote:
Rhamphoryncus [EMAIL PROTECTED] writes:
Nope, it's pretty fundamental to working with text, unicode only being
an extreme example: there's a wide number of ways to break down a
chunk of text, making the odds of e being any
On Apr 15, 1:55 am, Paul Rubin http://[EMAIL PROTECTED] wrote:
Rhamphoryncus [EMAIL PROTECTED] writes:
Indexing cost, memory efficiency, and canonical representation: pick
two. You can't use a canonical representation (scalar values) without
some sort of costly search when indexing (O(log
On Apr 15, 8:56 am, Roel Schroeven [EMAIL PROTECTED]
wrote:
Paul Rubin schreef:
Rhamphoryncus [EMAIL PROTECTED] writes:
Indexing cost, memory efficiency, and canonical representation: pick
two. You can't use a canonical representation (scalar values) without
some sort of costly search
(surrogates,
4 byte UTF-8 sequences) for Scintilla, a text editing component.
I dream of a day when complete unicode support is universal. With
enough effort we may get there some day. :)
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo/python-list
, yes. One character,
two code units.
The only code that will be changed is that which doesn't handle
surrogates properly. Some will start working properly. Some (ie
random.choice(u'\U0010\u')) will fail explicitly (rather than
silently).
--
Adam Olsen, aka Rhamphoryncus
--
http
On Apr 20, 5:49 pm, Ross Ridge [EMAIL PROTECTED]
wrote:
Rhamphoryncus [EMAIL PROTECTED] wrote:
The only code that will be changed is that which doesn't handle
surrogates properly. Some will start working properly. Some (ie
random.choice(u'\U0010\u')) will fail explicitly (rather
I'd be lying if I said I supported
Unicode if I only handled the BMP.
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo/python-list
Stephen Kellett wrote:
function()
loop1()
blah
blah
loop2()
blah
loop3()
blah
blah3
otherloop()
Yannick wrote:
Hi,
I would like to program a small game in Python, kind of like robocode
(http://robocode.sourceforge.net/).
Problem is that I would have to share the CPU between all the robots,
and thus allocate a time period to each robot. However I couldn't find
any way to start a thread
unexpected wrote:
If have a list from 1 to 100, what's the easiest, most elegant way to
print them out, so that there are only n elements per line.
I've run into this problem a few times, and although many solutions
have been presented specifically for printing I would like to present a
more
Bill Pursell wrote:
Georg Brandl wrote:
Paul Rubin wrote:
Sybren Stuvel [EMAIL PROTECTED] writes:
Because of there should only be one way to do it, and that way should
be obvious. There are already the str.join and unicode.join methods,
Those are obvious???
Why would you try
Paddy wrote:
Rhamphoryncus wrote:
It's worthwhile to note that the use of + as the concatenation operator
is arbitrary. It could just have well been | or , and has no
relationship with mathematically addition.
The effect of the string concatenation operator is only secondary
that a python dictionary lookup can have less cost
than two simple array indexes, but there you go. Python dictionaries
are already damn fast.
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 30, 12:04 pm, Chris Mellon [EMAIL PROTECTED] wrote:
On 8/30/07, Rhamphoryncus [EMAIL PROTECTED] wrote:
On Aug 29, 8:33 pm, Carsten Haese [EMAIL PROTECTED] wrote:
On Wed, 2007-08-29 at 19:23 -0600, Adam Olsen wrote:
There is no loop overhead here, and after subtracting the function
semantics.
--
Adam Olsen, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo/python-list
, aka Rhamphoryncus
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 142 matches
Mail list logo