rg/projects/python/trunk/Modules/parsermodule.c
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
you
expect that __hash__ or __eq__ may access the dictionary recursively.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ack from people with different cultural background
to evaluate it fully - most other PEPs are culture-neutral.
So, please provide feedback, e.g. perhaps by answering these
questions:
- should non-ASCII identifiers be supported? why?
- would you use them if it was possible to do so? in what cases?
-- programmers using non-ASCII symbols would be responsible for
> the consequences of their character choice.
Indeed.
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> It should be noted that the Python community may use other forums, in
> other languages. They would likely be a lot more enthusiastic about
> this PEP than the usual crowd here (comp.lang.python).
Please spread the news.
Martin
--
http://mail.python.org/mailman/listinfo/python-list
to GREEK CAPITAL LETTER OMEGA. It can't
be confused with it - it is equal to it by the proposed language
semantics.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
uitability of Unicode characters...
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
although many compilers still don't.
For dynamic languages, Groovy also supports it.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Higher-level programming languages can use that to encode symbols
in UTF-8.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
t be good reasons to allow (and ignore) them; however,
it recommends against doing so except in special cases.
So I decided to disallow them.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
hey are Python.
(look me in the eye and tell me that "def" is
an English word, or that "getattr" is one)
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
s supported Unicode subset,
edit, then convert back.
However, I somewhat doubt that this case "my editor cannot display
my source code" is likely to occur: if the editor cannot display
it, you likely have a ban on those characters, anyway.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
double, or redouble in a card game", or b)
"to let something go by without accepting or taking
advantage of it".
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
se three aspects
you doubt:
1. there are programmers which desire to defined classes and functions
with names in their native language.
2. those developers find the code clearer and more maintainable than
if they had to use English names.
3. code clarity and maintainability is important.
Re
d you shouldn't. What you can prevent is that the code
enters *your* project. I cannot see why you want to censor what code
other people publish.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
coding within the file, and there was
always a default encoding. The default encoding will change to
UTF-8 in Python 3.
IDLE has been supporting PEP 263 from the beginning, and several
other editors support it as well. Not sure what other tools
you have in mind, and what problems you expect.
Regar
and what specific problems
do you expect?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
in the first place).
Another possible reason is that the programmers were unsure whether
non-ASCII identifiers are allowed.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
fort to defend their
position in a usenet group. So that the majority of the responses
comes from people with strong feelings either way is no surprise.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
editors. With a default of UTF-8, it's still simpler than
with PEP 263: you can say that .py files are UTF-8, and your
editor will guess incorrectly only if there is an encoding
declaration other than UTF-8.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ore, but happily do it again: I have lived many
years without knowing what a "hub" is, and what "to pass" means if
it's not the opposite of "to fail". Yet, I have used their technical
meanings correctly all these years.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
it is
not clear to me how to interpret the algorithm in section
5, plus it says that this is just one of the possible
algorithms.
Finally, Confusable Detection is difficult to perform on
a single identifier - it seems you need two of them to
find out whether they are confusable.
In any case, I
ferenced later on.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
past that patches were admitted which don't
simultaneously update the documentation, hence they diverge. These
days, patches are regularly rejected for not providing proper
documentation changes.
As you now found a difference, please write a patch and submit it
to sf.net/projects/python.
R
ode changes). So from a maintenance point of view,
the documentation is at a better standing than the code.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
no data type for
"ASCII string" anymore, so all __name__ attributes and __dict__ keys
are Unicode strings - regardless of whether this PEP gets accepted
or not (which it just did).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Neil Hodgson schrieb:
> Martin v. Löwis:
>
>> ... regardless of whether this PEP gets accepted
>> or not (which it just did).
>
>Which version can we expect this to be implemented in?
The PEP says 3.0, and the planned implementation also targets
that release.
code charts, at
http://www.unicode.org/charts/
Notice that an HTML page that includes individual bitmaps
for all characters would take *ages* to load.
Regards,
Martin
P.S. Anybody who wants to play with generating visualisations
of the PEP, here are the functions I used:
def isnorm(c):
nce each of these reasons had (because
I did not conduct a scientific research to gain statistically
relevant data on usage of non-ASCII identifiers in different
regions of the world).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
.name(c).replace(" ","_"))+"_"
return (s, exc.end)
else:
raise TypeError("can't handle %s" % exc.__name__)
codecs.register_error("namereplace", namereplace)
print u"Schl\xfcssel".encode("ascii", "n
at would be invalid syntax since the third line is an assignment
> with target identifiers separated only by spaces.
Plus, the identifier starts with a number (even though 6 is not DIGIT
SIX, but FULLWIDTH DIGIT SIX, it's still of category Nd, and can't
start an identifier).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
file can be deleted. Therefore, during uninstall, you see two
actions: first, it says that it removes files, then, it says that
it removes backup files.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
k case - Python cannot know whether it is ASCII if it is
not UTF-16. For example, it might also be Latin-1 or UTF-8 if it is not
UTF-16, or, say, iso-2022-jp.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
articular).
GUI is much harder - in Tk, the amount of system-specific code is
significant (ca. 80 kLOC specific to either Unix, Windows, or Mac,
compared to 240 kLOC total, for Tk 8.4.7). Fortunately, Python
abstains from implementing its own cross-platform GUI library,
and offloads that burden
ot;. So Perl _clearly_
is for generating reports :-)
FWIW, I think the main purpose of Python is to do testing on distributed
operating systems :-)
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
.
If Python was build with mingw, it might be that such modules could
not work anymore, depending on how precisely the mingw build is
done (e.g. what CRT you would use).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
L LETTER DELTA}"
or
print u'\u0394'
This should work as long as your terminal supports printing
the letter at all.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
the file OK. why?
Your version of Windows uses a code page that supports Chinese
characters in the byte-oriented character set. These are normally
encoded using the "mbcs" encoding (except that the terminal likely
uses a different encoding). So if you use "mbcs" instead of "
50", you should be able to
display the euro sign (but will simultaneously use the ability
to display the letter delta, and the chinese letters).
I don't know whether the terminal supports an UTF-8 code
page; you can try setting the terminal's code page to
65001 (which should be UTF-8).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> I'm compiling 2.5.1 and end up with a 3.5MB libpython2.5.so file. I
> seem to remember it should be somewhere around the 1MB mark. What
> could be causing this?
Try stripping it.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Kenneth Love wrote:
> That should teach me not to change working code at the same time I am
> writing unit tests. Even so, I realize it won't be the last time I
> do something so silly. Yes, I know about TDD's "write the test first",
> but I'm not comfortable with the philosophy of these new fan
UI are up-to-date; they
don't need further development. Win32 itself stopped years ago.
You can write GUI applications with PyWin32 just fine.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
e a preprocessor output (posixmodule.i), by adding
-fsave-temps to the compiler line compiling posixmodule.c
(copy the line from the make output into a shell, and add
this command line); then inspect that output to see whether
lstat has been declared.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
n the first place). Most additions
did not concern GUI programming, which is what you were after, and
even those that are recent additions are rather rarely needed, so
you likely won't miss them. If you do, ask Mark Hammond to add them.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> Thanks Martin. Did I mention this was OpenBSD 4.1 in the original post?
> Here's the patch:
It may work, but I don't like it. Can you please try this one instead,
and report whether it works?
Thanks,
Martin
em: struct winsize is conditional.
> Here are the differences between the pyconfig.h with my patch and with yours:
>
> [EMAIL PROTECTED]:/bu/pkg/Python-2.5.1$ diff pyconfig.h pyconfig.h.martin
I see. The macros _BSD_SOURCE didn't actually get defined.
Please try the revised patch
> Guess I have the answer as to no one seems to write GUI apps for
> Windows natively :-)
That's certainly an important factor. If I wanted to ship a small
application, I would write a web server, and run that locally.
GUI programming is so last-century :-)
Regards,
Mart
> I would like to know if this is correct, or am I missing something here?
You must be missing something, although I'm uncertain what precisely
that is.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
r.encode` and `unicode.decode`. But there are at
> least uses for `str.encode` like 'sting-escape', 'hex', 'bz2', 'base64'
> etc.
Indeed, in Py3k, those will be gone.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
join [EMAIL PROTECTED]
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> In perl, I can write __END__ in a file and the perl interpreter will
> ignore everything below that line. This is very handy when testing my
> program. Does python have something similar?
Sorry, no, it doesn't.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
tart new thread");
PyErr_SetString(ThreadError, "no current thread ident");
PyErr_SetString(ThreadError, "setting stack size not supported");
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ing_with(k,v)
> and IIUC Guido has said all along that not much
> code will run on both.
I think you misunderstood. It's not a design goal that code works
without modifications, yet most reasonable code will even without
that being an explicit goal.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ninterested").
I think comp.lang.python is then the wrong place to find out; the py3k
list likely reaches more of these developers. OTOH, I don't know whether
they all want to participate in a survey of their expectations...
Rather than studying people's opinions, why don't you try to port your
own projects to 3k, and report whether you found it practical to use
a single source (assuming you would prefer such a solution for your
own project)?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
John J. Lee schrieb:
> "Martin v. Löwis" <[EMAIL PROTECTED]> writes:
> [... snip stuff I don't follow ...]
>> However, it *is* a design goal to make 2.6 so that transition to
>> 3k becomes simpler. That's not a 3k feature, but a 2.6 one.
>
>
#x27;s best to wrap stdout with the result of codecs.getwriter. If
you want to use the user's locale as the encoding, use
locale.getpreferredencoding().
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
they actually
ran into (rather than listing issues they anticipate to run into),
only then I can make guesses as to what the common case will be.
Ask this question a year from now again.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> I don't see how file() can be "removed", actually, unless the
> file type itself is getting axed.
Indeed, that's the case. Py3k won't use stdio for file input and
output, but the io module.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> After installation my program that uses tokenize module,when I run
> myprogram.exe (vgsveki.exe):
>
> AttributeError: 'module' object has no attribute 'untokenize'
Perhaps you use the 2.4 version of tokenize.py here, which did
not have untokenize.
Regards,
M
ple clients want to direct the same controller
simultaneously, by, well, queuing up the tasks.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
e.g. a specific piece of
code that reproducibly wastes memory. If you want to
study how Python objects are allocated and released,
you need to create a debug build of Python (and all
extension modules), and start, e.g., with looking at the
value of sys.gettotalrefcount() over time.
HTH,
Martin
--
h
the just number them. I wonder what this will do to backtraces,
cross-module imports, and such...
With Python 3, they can restrict themselves to just translating
keywords, and leave all identifiers in place.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
quot;.bashrc", in your
home directory. If that still doesn't work, type "env" before starting
idle, and inspect its output.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
or that, Python cannot expose it to you, either.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
* operations are atomic (e.g. .sort() is not),
but both append and pop happen to be atomic (which is primarily because
they don't need to call back to user-defined functions, unlike sort).
It's not a language property, though; things may be different in Jython
or IronPython.
Re
b/module-Queue.html
Why do you think they are not?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
>> Why do you think they are not?
>
> Because they aren't. You even mentioned that a few operations that
> aren't atomic.
OTOH, the OP specifically asked for .append() and .pop(), which are
atomic.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
imited version would be of any use (e.g. to the OP),
I don't know.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ed on the sysem,
and Microsoft promises that the newer version will be fully compatible
with the older one.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
record = view.Fetch()
if not record: break
print record.GetString(1), record.GetString(2), record.GetString(3)
Unfortunately, GetString is not implemented yet, so it might be that
what you want to do is not possible yet.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
= view.Fetch()
> _msi.MSIError: function failed
Ah. You need to call view.Execute() first. See
http://msdn2.microsoft.com/en-us/library/aa370514.aspx
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
what exactly needs to be
> included as an argument, especially for a select statement. Thanks for
> the help.
It's ok to pass None as the parameter to Execute; this means that
a null handle gets passed as hRecord to MsiViewExecute.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ython 2.7,
3.1, or so. Faster if a patch is contributed.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
unction
> so that it is accessible, but I don't know beyond that.
See PC/_msi.c. If I give further guidance than that, I may well do it
myself.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
specified encoding, or one derived from
the context. Experience has shown that this is possible in nearly
every case (and in all cases if an appropriate refactoring is made).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
hat the older values changed in the example
that you think works as expected.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ollect() if you want to see what
uncollectable garbage you have.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
you want it cross-platform, you can check whether sys.getobjects
is available. That, of course, is also unsafe because there isn't
a single "debug build" on Unix, but instead, several debugging
features can be enabled and disabled separately, so you would have
to specify first what preci
> It is a huge problem and weakness of python
Would you like to contribute a patch?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
tation of your application instead?
If that solves your problem, go for it!
> A patch might
> be rejected by anybody in a bad mood or who don't understand why it is
> usefull.
That's true.
Martin
--
http://mail.python.org/mailman/listinfo/python-list
before execution;
in Python, the byte code is interpreted.
Whether this makes Python an interpreter or a compiler,
I don't know.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
} :-{{}}".format('Fred')
d = datetime.date(2007, 8, 18)
"The year is {0.year}".format(d)
'{0:.3s}'.format('abc')
'{0:.0s}'.format('abcdef')
'{0:3.3s}'.format('abc')
'{0:3.2s}'.format('abc')
t gets a request. And indeed, the program
> gets reloaded for
> each HTTP request. Something is probably misconfigured. But what?
The most likely reason is that your FastCGI server voluntarily choses
to exit after one request. Can you share the mainloop of your
application?
Regards,
Marti
y they have not fully
understood. I often ask my students what the difference
between "eingeben", "ausgeben", "übergeben" und
"zurückgeben" is when they start saying that "die
Funktion gibt das Ergebnis aus".
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
efault? I would advise against Sethandler, and
recommend AddHandler instead.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Martin v. Löwis wrote:
> If I extrapolate my experience with German IT language, I
> think people often use terminology they have not fully
> understood. I often ask my students what the difference
> between "eingeben", "ausgeben", "übergeben" und
>
the correct procedure for installing zlib from source into Python?
Depends on the operating system and the Python version. On Unix, you
need to install zlib first; if you install a precompiled zlib package,
make sure you install the header files as well.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> I'm building 2.5.1 from source, using the ubuntu(7.0.4)-provided gcc
> 4.1.2.
Something must be terribly wrong with your system if you have to go
through such hassles. It should build out of the box, and does for
me on Debian.
Regards,
Martin
--
http://mail.python.org/mailman/list
n Include/token.h. The semantic
restrictions are mostly implemented as SyntaxError. These are
raised under various circumstances - search the code for SyntaxError,
for details.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> Is pwdmodule.c supposed to be excluded for windows compilation?
Yes, it is - it gives access to /etc/passwd.
See PCbuild/*.vcproj for what files get compiled on Windows.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
bly not fit in the CPU cache. You
should be worried about reducing disk IO, so all processing of a file
should run completely in memory. For that, it is better if you run an
input file from the beginning to the end - if you would first read
all 800 files, decompress them, then likely the output wil
Andi Clemens wrote:
>
> It's working!!!
> Yeah!
> I don't know why I didn't get this the first time I tried dnspython, but now
> its working! And it's so easy, 3 lines of code:
>
> def make_dns_entry(pix):
> update = dns.update.Update(_DOMAIN)
> update.replace(pix.name, 3600, 'a', pix.
7;t be fixed until 2.5.1
This is not true. Copying the tix files into the Python installation
will work just fine.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
gt;return uint16_t)data << 8) | hi8 (crc)) ˆ (uint8_t)(data >> 4)
> ˆ ((uint16_t)data << 3));
> }
Most likely, lo8(crc) == crc & 0xFF, and hi8(crc) == (crc >> 8) & 0xFF
(the last bit masking might be redundant, as crc should not occupy more
than 16 bits
s. To avoid this call to
repr, you need to iterate over the list yourself, and print it:
if matches:
for m in matches:
print m,
print
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
is the '.
This still won't give you the output "Here is the problem",
as that will insert a closing tag. If you really want to produce
the text
'\nHere is the
problem'
you cannot use an XML library to do so: this text is not
well-formed XML (because is illegal syntax).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
one for
Python 2.1 (say), the problem wouldn't be relevant today. If you submit
one today, the problem won't be relevant for Python 2.8, or Python 3.0.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> After a lot of output, got this:
You will need to check this output line-for-line to see
why it fails.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
. I had to
> jump through some hoops to get it to build on VC 2005 64 bit, but that
> at least had an IDE to use
If you use vsextcomp, you also have an IDE to do the build. This
is indeed how the official AMD-64 binaries for Python 2.5 were
produced.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
of main,
anyway, so you should be safely able to drop that.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
2701 - 2800 of 4331 matches
Mail list logo