O library will be likely 100% pure Python,
this needs thought.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
. are not made to gradually
move towards 3.0, but because it is anticipated that 3.0 will not
be adopted immediately, but, say, 3.2 might be. To provide new
features for 2.x users, new 2.x releases need to be made
(of course, the features added to, say, 2.7 will likely also
be added to, say, 3.3).
Zitat von Jack Diederich <[EMAIL PROTECTED]>:
> +if (sep_found):
This should be
if sep_found:
> If folks like the way this partial set looks I'll convert the rest.
Otherwise, it looks fine.
Martin
___
Py
ideas
how to further improve the performance. Using a plain
32-bit int as the representation could be another
try, but I somewhat doubt it helps given that the
the supposedly-simpler single-digit case is so
slow.
Regards,
Martin
___
Python-3000 mailing
he EOF as the parentheses aren't balanced.
> I ran reindent prior to committing, but that had no effect (ie,
> still go the error).
I find that hard to believe - running reindent.py on the file
fails for me with Python 2.5 as well.
Regards,
Martin
__
's examples.
True. However, this does not mean that the file names are byte strings -
they are character strings in an unspecified/undetermined encoding.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mail
t did exist, it would be characters,
not bytes. "Canonical equivalents" is not a property of bytes,
but of Unicode characters (code points specifically).
Also, I'm not quite sure why you think the file system has
to do anything with sys.argv (unless your understanding of
what a "fil
's wrong with it? Well, if you use unix, with no spaces in
directories and legal 'quote', you'll probably say "nothing". String
interpolating command calls makes for unnecessarily non-portable code.
Now, if subprocess could only start (optionally) taking unicode
argument
k it does most of what you propose, including letting the
translators write the little code snippets that will determine if it
should be '1 file' or 'n files'.
The gettext manual has more to say here:
http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms
--
e. ctypes doesn't, and if you don't, they may be
garbage collected, crashing your program when a callback is made.
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://
IO's "feature" to support
> unicode, right?)
I believe the rationale for providing them as old-style classes also
was to support inheritance. Atleast, that's what the docstring in
StringIO.py says:
- There's also a much faster implementation in C, called cStringIO,
bypass
the restrictions.
I don't think any of the regular contributors is interested in
that kind of project.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubsc
(for acquiring the GIL out of nowhere) breaks if
there are multiple interpreters.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/opti
f you used IPC. This would be similar to .NET
AppDomains or Java Isolates.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
Abstract: Module initialization currently has a few deficiencies.
There is no cleanup for modules, the entry point name might give
naming conflicts, the entry functions don't follow the usual
calling convention, and multiple interpreters are not supported
well. This PEP addresses these issues.
Mod
e the colon or not?
- can you pass them to getattr, instead of strings?
Everything else follows from this spec (I hope). Symbols
compare for identity, are hashable, meant to be immutable
(Bug: the specification allows for mutation; the implementation
shouldn't).
Regards,
Martin
Kendall Clark wrote:
> Thanks, Martin. That is, in fact, pretty much what I'd like to see in
> Py3K, modulo the issue about getattr.
The question is still: why? In Smalltalk, symbols are used to denote
names (methods/selector names and class names); this apparently isn't
your int
get the naming right?
That would also work. But, if we also have finalizers, we already
need two macros to generate the function name.
> It'd allow
> easier changing of the naming and such in the future, but I don't know
> if that outweighs the discomfort of hiding function pro
referring to it
have been unloaded. So, when the DLL is unloaded, no action should
be taken. I also think it's not Windows only: on dl, we should invoke
dlclose when all modules have been finalized.
Regards,
Martin
___
Python-3000 mailing list
es should be able to
> participate in cyclic GC...
>
> Don't they already? They have a traverse proc, just not a clear proc.
Sure: for the state that is common to all modules. For the per-module
state, traverse functionality might also be needed, which w
ther.
This is because they only form a partial order. Of course, it
might be possible to impose a total order on top of it (e.g.
giving the left-more operands higher precedence, or considering
the order of registration). This all sound arbitrary, though.
Regards,
Martin
___
nge right away again,
and in case a), if anybody still has a pointer to the block,
we are in trouble, and clearing the pointer likely doesn't
help in finding the trouble.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail
nclude a requirement that the
standard library would always be restricted to ASCII-only
identifiers as a style-guide.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
ut all of this could happen today if there were
only contributions.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
it plays a special role in (number) literals. More
generally, there is the distinction of starter and non-starter
characters.
An identifier ends when the first non-identifier character
is encountered (although I don't think there are many places
in Python where you can have t
t;, and that punctuation would have to be ASCII, as
non-ASCII characters would be restricted to comments, string
literals, and identifiers.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
tend the definition of ID_Continue,
not the definition of digits.
> I do think that *eventually* we'll have to support this. But I don't
> think Python needs to lead the pack here; I don't think the tools are
> ready yet.
Python doesn't really lead here. The
rent: you really have to
understand the intent for giving a certain API its name, because you
won't be able to remember that many "non-sensical" character sequences -
just as you wouldn't be able to use the API if it was written in
Greek letters, with a Greek meaning.
Regards,
Ma
st other
> languages.
Ok. I was only worried about your change in PEP 3099:
"Python won't use Unicode characters for anything except string literals
or comments."
If that is only meant to say "this won't be introduced in Python 3",
I'm fine with
ut I do think improved support for custom numeric types is a very
> strong motivation for implementing generic functions in Python 3.0.
My guess is that it isn't brought up very often because very few
people have the problem you are talking about.
Regards,
Martin
__
the CD-ROM
or network installation, and that always included Tkinter
(in addition to also including PyQt and others)
So yes, there is no guarantee that Tkinter is installed on
all systems that have Python installed (not even Windows),
but no, the core dis
having
the same name, and despite them giving equal results for some arguments,
it doesn't feel to me that these functions should get unified.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/pyt
at sqrt function live? I hope you are not proposing it
becomes a builtin - I dearly wish there were fewer builtins, not more.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubsc
sqrt(float) would cause a stack overflow for
calling itself.
In any case, I still wonder whether these functions should be unified
when they have different semantics (e.g. when passing negative ints or
floats to math.sqrt vs. cmath.sqrt).
Regards,
Martin
__
type into a
dictionary. If the type is anonymous, they will do
dispatch[type(0)] = marshal_int
dispatch[type(sys.maxint+1)] = marshal_int
Plus, their current code as
dispatch[int] = marshal_int
which will silently break (although it won't be silent if they also
have dispatch[long]
tomer filiba schrieb:
> so why not choose the "get%s()" notation?
Why not o.__class__?
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.pytho
ng result;
if(!PyLong_ToLong(val, &result))
Py_FatalError("old-style integer conversion failed");
return result;
}
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubsc
ilation)
d) No real support for C++ (where there are even more ABI
issues: (multiple) inheritance, vtables, constructors,
operator overload, templates, ...)
To access a C API, the only "right" way is to use a C compiler.
ctypes is for people who want to avoid using a C compiler a
layers. I even doubt that
exposing writev in Python would make a measurable performance
difference.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.o
Paul Prescod schrieb:
> I haven't created locale-relevant content in a generic text editor in a
> very, very long time.
You are an atypical user, then. I use plain text files all the time, and
I know other people do as well.
Regards,
Martin
___
perate on Py_UNICODE* (although
we don't have literals for these) or
- be removed
Likewise, PyString_AsString either goes away or changes its
return type.
String APIs that operate on PyObject* likely can stay as-is.
Regards,
Martin
___
Python
know how to
deal with tag characters
- you could guess the language from the content, based
on the frequency of characters (e.g. presence
of katakana/hiragana would indicate that it is
Japanese). As with all guessing, there are
cases where it fai
bjects
from system APIs where available (e.g.
in glibc), and not provide them on systems that don't
have locale objects in their APIs.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
, Python is going to silently misinterpret my data.
No. It will use a different API to determine the system encoding, and
it will guess correctly.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listi
FC-imposed requirement that each line
of input is "neutral" wrt. character set switching,
so you can typically synchronize at a line break. Still,
this could require to skip an arbitrary amount of text.
Regards,
Martin
___
Python-3000 mailing
knows very well which one to use in which place.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
to export and import
its state into such "tell objects".
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
ke integers don't remember which base they were originally
represented in).
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
ainable. Start with implementing len(s).
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
have no such problem.
I'm not so much worried about UTF-8 or Latin-1; they are fairly trivial.
Efficiency of such methods for multi-byte encodings would be
dramatically slow.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
htt
my objection is this: What about errors that occur in decoding?
What happens if the bytes are not meaningful in the presumed encoding?
ISTM that raising the exception lazily (which seems to be necessary)
would be very confusing.
Regards,
Martin
___
maximum code point is, where they
currently can decode in a single pass. Of course, for multi-byte codecs,
such scanning is a good idea, anyway (some currently overallocate just
to avoid the second pass).
Regards,
Martin
(*) Many systems don't allow such large memory blocks,anyway.
E.g.
Josiah Carlson schrieb:
>> That places a burden on all creators of strings to ensure
>> that they are in the minimal format, which could be
>> inconvenient for some operations, e.g. taking a substring
>> could require making an extra pass to re-code the data.
>
>
c would have to create the string of the right
width; a codec written in C would make two passes, rather than
temporarily allocating memory to actually represent the UCS-4 codes.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.
ptions; I'd rather debate about the necessity of one-byte and
four-byte representations.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
,4). If the algorithm isn't symmetric (i.e.
you can't reduce (2,1) to (1,2)), you need 9 different versions of the
algorithm. That sounds more complicated than always decoding.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
in Python, option 3 if it is written in C
(yes, you can use multiple truly concurrent threads in Python: just
release the GIL on the C level; you can't make any calls into Python
until you reacquire the GIL).
Regards,
Martin
___
Pytho
every cache line containing Python objects - including
> functions, modules... - has to be written back when it is evicted, even
> if those objects are "constant".
Yes, though this is likely negligible wrt. to the overhead that locking
operations on refcount cha
ot getting the declarations of
variables right, and endless bug hunts because a referenced object
is already collected, and its memory overwritten.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/m
es
in constant time "on average").
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
we" aren't going to fix it, not with Python
3.0, and likely not with any release in the foreseeable future.
The only exception would be if somebody offered a reasonable
solution, which "we" would just have to incorporate (and possibly
mai
o), and the extension module
globals (types, and in particular exceptions).
Do you want them still to be global, or per-interpreter?
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/py
time. Allocation is in constant
time most of the time (in some applications, it's always constant).
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.pytho
ypes, and in particular exceptions).
>>
>> Do you want them still to be global, or per-interpreter?
>>
>> Regards,
>> Martin
>
> It is one fixable problem among many, but fixable none-the-less.
[...]
Your message didn't really answer the question, did it?
The former should get errors if too high of a
> character is used, the latter will need conversion if we're not using
> UTF-16.
Define "used". Surrogate pairs work well in the NTFS of Windows NT 3.1;
no errors are reported.
Regards,
Martin
__
Adam Olsen schrieb:
> As far as I can tell, CPython on windows uses UTF-16 with code units.
> Perhaps not intentionally, but by default (not throwing an error on
> surrogates).
It's intentionally; that's what PEP 261 specifie
e any desire to let people understand and join
> the discussion?
It's clear that there should be only a single character string type, and
that should be close to the current Unicode type, in semantics and
implementation.
Regards,
Martin
sistent python-level experience across platforms is a different
issue. CPython could behave absolutely consistently, and use four-byte
Unicode on all systems, and the length of a non-BMP string would
still be implementation-defined.
Regards,
Martin
___
Python-30
and slicing is a basic
> requirement, even if it has to be done using code units.
It's not possible to implement slicing in constant time, unless string
views are introduced. Currently, slicing takes time linear with the
length of the result string.
Regards,
Martin
_
ot;give me the data" kind would either have
to expose the choice of representations, or perform a copy. Either
alternative would produce many programming errors in extension modules.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.
ementation if there is only a single internal representation.
>> Either alternative would produce many programming errors in extension
> > modules.
>
> And even if that was true (which I don't believe), "many" would still
> be "very small"
that moving to
a tracing GC will require module authors to change their code. Perhaps
that isn't necessary. It is difficult to tell, in the abstract, whether
your proposal works or not.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@pytho
ays the right answer. In the specific case, I'm also worried about
the increase in complexness.
That said, it is always good to have a prototype implementation to
analyse the consequences better.
Regards,
Martin
___
Python-3000 mailing
oint is;
but it's just more code, and no problem in principle.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
efficient code
> for multiple representations is mostly trivial, even in C.
I wouldn't call SRE's macro trickeries "trivial", though.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mai
es 2*k and 2*k+1 to find the child nodes?
This would get down memory overhead significantly; you'd only
need the length of the array to determine what a leaf node is.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mai
tml#29
The BOM can also serve as an encoding marker. I refer to the
BOM encoded in UTF-8 as "UTF-8 signature". As such, it is
very meaningful. Usage of the BOM in UTF-8-encoded text
is deliberate.
Regards,
Martin
___
Python-3000 mailing lis
Georg Brandl schrieb:
>>>>> b = (codecs.BOM_UTF8 + "hello").decode("utf-8")
>>>>> len(a)
>> 5
>
> This behavior is questionable...
Indeed. Try
py> b = (codecs.BOM_UTF8 + "hello").decode("utf-8-sig")
py> le
implementation.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
does the interpretation. On Linux, the
magic bytes that are recognized can be extended at run-time, which
make the "utf8script" Debian package possible.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.pytho
g
> Jennifer:~ bwinton$ ./test
> -bash: ./test: cannot execute binary file
This works fine in Debian if you have the "utf8script" package
installed.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
ht
is called
"Program Files" in the English version (and doesn't get renamed when
a MUI package is installed), and is called "Programme" in the German
version.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.or
anslation. In Germany, some translators now use UTF-8
for translations, as this supports the typographically correct
„quotation“. gettext will automatically transliterate these if the
locale does not support them.
So you shouldn't use the encoding of .mo files to infer some sor
three?
Not sure what implementors you are talking about: anybody who wants
to clone Python is free to do whatever they want. We *are* the
implementors of CPython, and if we don't want to do more, then
we just don't want it.
Regards,
Martin
___
ither require to read data from a stream, nor
to open a file. If we read data from a pipe, it is probably
most natural to assume that the system code page/locale
encoding is used for these data.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@p
a
reasonable way. With that generality, you lose any information
as to what the internal representation is, and then code becomes
tedious to write and slow to run.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org
it slow. It's the copying of
potentially large string data that a recoding requires. In addition,
for some encodings, the algorithm to do the transformation is
fairly slow.
> I'll admit that I'm not sure what sort of data would make a real-world
> (as opposed to contrived) be
lder on disk is
always called "Applications", it is rendered with a directory name
of "Programme" if you use the German localization, in the OSX Finder.
While it solves the problem, it is very confusing if you use shell-level
interaction (the shell won't accept "Programm
an one package.
Define distutils features that are obsolete, and come up with
a strategy of removing or replacing them.
When you are done, you can come back proposing that the library
should be made out of distutils packages.
Regards,
Martin
___
Pytho
etting that
cannot be changed).
The Unix principle is often extended to reach into areas where it really
becomes inadequate, look at Plan 9 for an example. Wrt. byte streams
and encodings, the principle works only if all applications use the
same encoding (w
and often
have a BOM. I've never seen an UCS-4 file "in the wild" (except for
testing, of course).
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://
e from the "middle" (say, U+F4xx). There is
a slight chance of ambiguity here if the actual input also
contains such PUA characters; if you worry about this, you could
escape those.
For Py3k, I would like to propose a standard "binary" codec
See RFC 2279:
# Character values from to 007F (US-ASCII repertoire)
# correspond to octets 00 to 7F (7 bit US-ASCII values).
So U+ is represented by the octet 00.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
re modular and better documented architecture than
> distutils.
I definitely disagree. Why are you calling distutils non-modular?
It was designed to be modular and extensible, and, indeed, it is.
If it is not documented well, the solution shouldn't be to replace
it, but
existing
codecs, and help to decode undecodable file names in a way
that round-trips.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
nctionality is
missing in distutils (e.g. means for more transparent extension), then
distutils should be enhanced to provide this functionality.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
e()' method
- changed 'get_outputs()' so it includes bytecode files
A lot of the code added is very similar to code in install_lib.py;
would be nice to factor it out further.
Notice that it is meant to be off by default, and, indeed, for me,
it is off. Not sure why you are getting .pyc files in your
build directory.
Regards,
Martin
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
look like? How would it operate on systems other than
the Mac?
> Unless the basic structure is so far from what's
> needed that it can't be reasonably fixed.
See, and I believe this isn't the case for distutils.
Regards,
Martin
__
support for that:
distutils.dep_util offers a couple of routines that
do time-stamp checking. You don't have to reinvent,
but you do have to specify what should happen when
some file is newer than some other file. distutils
cannot know this.
Regards,
Martin
_
pting to deal
with it is complex, incomplete, and non-intuitive. And that
statement is IMO not only true about distutils, but also
about its direct competitors, and about the more-remote
relatives (such as dpkg, rpm, msi, OSX packages, ...)
Regards,
Martin
___
Pyth
1 - 100 of 717 matches
Mail list logo