a upon iteration (it's a binary
tree); they're now adding std::unordered_map (and std::unordered_set), to
be implemented with a hash table. So, if you come from C++, it's easy to
mistake the meaning of an ordered dict.
This said, I don't have a specific suggestion, but I wo
r each third party module.
Were those project files generated automatically, changing between
external modules within or outside python2x dll would be a one-line
switch in CMakeLists.txt (or similar).
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
ve dependency.
CMake is readily available on all platforms, and it can be installed in a
couple of seconds.
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pyth
is pretty common in project management. For instance, GCC has a rather
complex 4-stage release process, whose last phase (beginning at the point
the release is branched in SVN) is made of commits only for regressions.
--
Giovanni Bajo
___
Python-Dev mailing list
lasses" and "from __future__ import unicode_literals" would be
really welcome, and would smooth the Py3k migration process
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listin
not be
> familiar with the intricacies of classes and
> metaclasses. I don't think it would hurt to have
> it available as a __future__ import as well.
>
> There's also the advantage that all of a
> module's future assumptions could then be
> docume
rk, many applications relying on it will *mostly* work as well. I
personally don't think it's such a big problem if one has to fix a couple of
things in a 100K-line application to adjust it to the new .0 release, even if
it's actually because of a bug in Python itself.
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
its ETA, and the release manager then publishes a work-plan for
Stage 1 and 2, telling which projects will be merged when. This avoids
multiple large projects to hit the trunk at the same time, causing may
headaches to all the other developers. The w
ill works...).
SIP is free and generic btw, you may want to consider it as a tool.
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/opti
ext(__builtin__.object)
| Contains the context for a Decimal instance.
[...]
| flags - When an exception is caused, flags[exception] is incremented.
| (Whether or not the trap_enabler is set)
| Should be reset by user of Decimal instance.
[...]
--
Giovanni Bajo
__
s on a single long operation because the GIL is not released and the
alarm thread does not get its chance to run.
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
ht
the consequences can at least be
> analysed.
I agree, and in fact Brett's work on a proper security model is greatly
welcome. It's just that us mere mortals need to use eval() *now*, and that
recipe is good enough for many practice uses. If you can't win, you can at
least lose
*bignum or similar mathematical
operations, but there are really a few. If we could make those release the
GIL (or poll some kind of watchdog used to abort them, pretty much like they
normally poll CTRL+C), then the same trick used by the recipe could be used.
--
Giovanni Bajo
_
ture optimized for many operations (like a "rope" or
something complex like that). Documenting that it's just a bare vector
(std::vector in C++) would be of great help.
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
in array
because of higher overhead of implementation (higher constant factor).
And if this is allowed, I would like to find in CPython tutorials and
documentations a simple statement like: "to implement the list and match its
requirements, CPython choose a simple array as underlying data structure&
ts of VC8 with PGO, and the fact
that Visual Studio Express 2005 is free forever, I would hope as well for
the decision to be reconsidered.
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pyth
and, in case there's interest, the discussion moved to the py3k list.
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
n
a way (see the true division issue): the idea is that, all in all, user
shouldn't really care what type a number is, as long as he knows it's a number.
On the other hand, unicode and str are going to diverge more and more.
Giovanni Bajo
___
Py
it's a number.
>> On the other hand, unicode and str are going to diverge more and
>> more.
>
> Well, not really. True division makes int/int return float instead of
> an int. You really do have to care if you have an int or a float most
> of the time, they're
zations. are you sure you need
> that module ?
Oh yes, it's a 30% improvement in pystone, for free.
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mai
ce), so that NOT having the bug fixed in a point release is
not a problem.
Anyway, I'm not pushing for this specific policy (even if I like it): I'm just
suggesting Release Managers to more formally define what should and what should
not go in a point release.
Giovanni Bajo
__
c:\ being too permissive for a software installation).
Besides, it won't be allowed in Vista with the default user permissions.
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscr
design of the
packages.
This is how I usually design my packages at least. There might be valid use
cases for doing sys.path hackery, but I have yet to find them.
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mai
fic), so it likely needs to be maintained separately.
>> It was written for the current trunk, but hopefully applies
>> to most recent releases.
A way not to maintain this patch forever would be to devise a way to make
format syntax "pluggable" / "scriptable". Ther
ording to how many levels of __init__.py there are...)
Since I consider this more of an environmental problem, I would not find
satisfying any kind of solution at the single module level (and even less so
one requiring so much guess-work as this one).
Giovanni Bajo
ng fruit. By carefully selecting which modules to link in, I was
able to reduce of another 300K or so, but nothing really incredible. I would
also suggest -ffunction-sections in these cases, but you might already know
that.
Giovanni Bajo
___
Python-Dev m
ng rarely used features (like
__var in the other thread). I just can't see how dropping __del__ makes things
easier, while it surely makes life a lot harder for the legitimate users of it.
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
y what
exactly is "unrelated" for you.
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
der if the performance improvement comes from ceval.c only
(or maybe a few other selected files). Is it possible to somehow link the
PGO-optimized ceval.obj into the VS2003 project?
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://m
re to be
> only One Obvious Way To Do It.
I'm totally in favor of obsoletion and removal of old cruft from the standard
library.
I'm totally against *not* having a standard library.
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
I apologize, this had to go to [EMAIL PROTECTED]
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
maintained at this point (if you exclude the setuptools stuff which is its
disputed maintenance/evolution).
subprocess has been introduced in Python 2.4.
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/lis
ooks.ModuleImporter(ihooks.ModuleLoader(_NoBarePycHooks())).install()
== /nobarepyc.py
Just import it before importing anything else (or in site.py if you prefer)
and you'll be done.
Ah, it doesn't work with zipimports...
--
Giovanni Bajo
_
and regenerate them as needed". So, the few
times that you really care that a certain application is run with a specific
setting, you can use "python -I -OO app.py".
And that's all.
--
Giovanni Bajo
___
Python-Dev mailing list
Hello,
wasn't there a project about the zipfile module in the Summer of Code? How did
it go?
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.pytho
bits, and the STOP macro would check for FPU errors and raise an appropriate
exception if needed.
Is this suggestion still valid or people changed their mind meanwhile? Would
such a rewrite of fpectl (or a new module with a different name) be ac
;t see how this can ever happen in the
2.x serie...
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
that
> form to make it less vulnerable to the spambots, I'd be happy to incorporate
> them into Buildbot.
I'd throw a CAPTCHA in. There are even some written in Python.
--
Giovanni Bajo
___
Python-Dev mailing list
Python-Dev@python.
dictionary operations. The only required property is that objects which
compare equal have the same hash value; [...]
I personally consider *very* important that hash(5.0) == hash(5) (and that 5.0
==
defined, all names which
do not start with '_').
This wouldn't prevent introspection tools to use mod.__dict__ to still access
the module's global dictionary, of course. But it would allow module's authors
to more clearly document the module's
eturn result
return self.http_error_default(url, fp, errcode, errmsg, headers)
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/pyth
this bikeshed:
a.[[b]]
handlers = chain.get(kind, ())
for handler in handlers:
func = handler.[[meth_name]]
result = func(*args)
if result is not None:
return result
Little heavy on the eye, but it seems that it's exactly what people want and
can
at it accepts a single iterable positional
arguments (or keyword arguments). This matches tuple() (and other containers)
in behaviour, and makes it easier to substitute existing uses with named tuples.
--
Giovanni Bajo
___
Python-Dev mailing list
Pyth
mp;atid=305470&aid=1616125&group_id=5470
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
re core developers.
Acceptance that any patch is better than no patch. There are many valid Python
programmers out there, and there are many many patches to stdlib which really
don't even require a good programmer to be written.
--
Giovanni Bajo
y believe this is just a red herring, pushed by some SCM wonk. The
problem with patch submission has absolutely *nothing* to do with tools. Do we
have any evidence that new developers are getting frustrated because they
can't handle their patches well enough with the current to
with these issues, I came to the personal conclusion
of avoiding threads as much as possible. Threads are processes with shared
memory, but in many real-world use cases I faced, there is really only a very
little chunk of memory which is shared, and Python makes it i
syntax to do it (ala Dylan's next-method), I would surely use it often enough
to make it worth.
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
works* is of little importance, since the article is
more about maintenance of existing code using super (and the suggestions he
proposes are specifically for making code using super less fragile to
refactorings).
--
Giovanni Bajo
___
Python-Dev mailing li
On 08/05/2007 19.37, Neal Norwitz wrote:
> Part of the problem might be that we are using an old version of svn
> (1.1) AFAIK. IIRC these operations were sped up in later versions.
Yes they were. If that's the case, then probably the server should be updated.
--
Gi
s pattern often require
more attention to details (eg: does the set keep a strong or weak reference to
the callback? What if I need to do several *transactional* modifications in a
row, and thus would like my callback to be called only once at the end?).
--
Giovanni Bajo
___
d it's spelled it.next(). getitem(it, -1)
might be useful in fact, and it might be spelled last(it) (or it.last()). Then
one may want to add first() for simmetry, but that's it:
first(i for i in candidates("foo") if i not in us
support. In fact, I didn't face any major
problems in using it under Windows (even in the details: eg, it supports
case-insensitive filesystems).
I can't speak of bzr.
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://
extual line changes.
[ I'll also remember that "ease of maintanance for developers" is the #1
reason for having a 2.1Mb python25.dll under Windows, which I would really
love to reduce. ]
--
Giovanni Bajo
___
Python-Dev mailing list
Python
on to have mkstemp() return the
fd (except backward compatibility)?
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
that could be handled in
module tmpfile (especially since the final "rename" step requires a
little care to be truly multiplatform).
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
___
Python-Dev mailing list
[email protected]
http://ma
Hello,
I'm trying to login into the tracker but it gives me "invalid login"
even after multiple password resets. I can't submit a proper bugreport
because... I can't login :)
Who can I privately contact to avoid spamming this list?
Thanks!
--
Giovanni
rammers have
learnt to save code lines by relying on the reference-counting semantics.
[[ my 0.2: it would be a great loss if we lose reference-counting
semantic (eg: objects deallocated as soon as they exit the scope). I
would bargain that for a noticable speed increase of course, but my own
experi
more features than those I notice within Python's
installer.
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
build the official one with CRT bundled. I
personally don't see this as a show-stopper (does anyone ever build
the .msi besides Martin?).
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
___
Python-Dev mailing list
[email protected]
er, on which we can start doing some evaluations.
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
an alternative that doesn't require full
understanding of MSI and msi.py would probably low the barrier and allow
more people to help you out.
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
___
Python-Dev mailing list
Python-Dev@py
e a very hard time persauding the experienced Windows
developers in this list that git-win32 is a good thing to use.
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman
the file
descriptor is automatically closed as soon as the file object is
destroyed. If you then feel "safer" always using with or try/finally,
nobody is going to complain. And everybody will be happy :)
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
On gio, 2009-01-22 at 18:42 -0800, Guido van Rossum wrote:
> On Thu, Jan 22, 2009 at 5:22 PM, Giovanni Bajo wrote:
> > CPython will always use reference counting and thus have a simple and
> > clear GC criteria that can be exploited to simplify the code.
>
> Believe t
On 1/23/2009 4:27 PM, Guido van Rossum wrote:
On Fri, Jan 23, 2009 at 2:57 AM, Giovanni Bajo wrote:
I miss to understand why many Python developers are so fierce in trying
to push the idea of cross-python compatibility (which is something that
does simply *not* exist in real world for
the official script),
and you're done: say hello to "-g/--use-merge-history", to be use with
svn log and svn blame.
This is a good writeup of the new features:
http://chestofbooks.com/computers/revision-control/subversion-svn/Merge-
Sensitive-Logs-And-Annotations-Branchmerge-Advance
of non-stop discussing bytes that must be
>> considered a possibility.)
>
> We do, and it's not been removed: the -U switch.
It's not in the output of "python -h", though. Is it secret or what?
Giovanni Bajo
___
Pyt
sage of the default
value (copy vs deepcopy vs whatever)? Given that the most of the default values
I have ever wanted to use do not even require a lambda (list, set, int come to
mind).
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
est parent's
binding.
+0, and I like "outer". I like the idea, but I grepped several Python
programs I wrote, and found out that I used the list trick many times, but
almost always in quick-hack code in unittests. I wasn't able to find a
single instance of this
re is a warning for builtin
shadowing, to be used by people which such a coding standard, doesn't mean
that everybody must agree with it.
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listi
al, in fact, is to move many of those
builtin extension modules from python.dll out into their own .pyd files
where they'd belong (were not for this technical annoyance of being forced
to use the settings dialog in MSVC).
--
Giovanni Bajo
___
Python-D
his example) and the current version of the generated
vcproj/sln files would be committed in SVN under PCbuild, so to have a
minimal impact on developer habits.
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://ma
I've had thought about something like that for py2exe
> a long time ago),
That's exactly the reason: packaged executables. I'm sure there is still
some weird encoding in world, with 2Mb of cute codec data tables, which is
only waiting for people to find out and merge it into pyt
Martin v. Löwis <[EMAIL PROTECTED]> wrote:
> On bzip2, I wonder whether
> 2.4 should also update to the newer library;
+1, I seem to remember of exploits with corrupted data fed to the bz2
decompressor.
Giovanni Bajo
___
Python-Dev
".partition(":") -> ("foo", None)
"foo".rpartition(":") -> (None, "foo")
Notice that None-checking can be done as a way to know if the separator was
found. I mentally went through the diff here
(http://mail.python.org/pipermail/python-
teration.
Unless this new proposal also includes changing the meaning of "except:" to
"except Error". Also, under this new proposal, we could even remove
Exception from the builtins namespace in Py3k. It's almost always wrong to
use it, and if you really really need it, it'
t confused and write:
except Exception, e:
# something
which changes the meaning. It "sounds" correct, but it's wrong. Of course, it's
easy to argue that "Exception" is just that, and people actually meant "Error".
In a way, the current PEP352 is superio
Exception, e:" + check for FooBar, will
still work as expected. At *worse*, it would be catching too much, like
SystemExit or GeneratorExit, which are still pretty uncommon exception.
OTOH, I also understand that people have been told that deriving from Exception
i
lag themselves,
> I wonder if anyone who wants help finding integer division really uses
> the flag.
-1 gratuitous breakage. There's noting really wrong or dangerous about the old
semantic, it just won't be the one used by Python 3.0. While it's nice to have
an option to help forwar
>> for py3k ? Gives us a good chance to evaluate, and if it doesn't work
out, it
>> wouldn't matter too much.
Another option would be Bugzilla, which is proven to be stable, maintained
and used succesfully by large open source projects (lik
no. Please!
Care to elaborate?
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
oject
like Python required something more advanced. Anyway, I'll shut up as I see
there is a committee for this decision.
The integration between tickets/svn/wiki in Trac is cute though, even if,
after a while, you'd really want that mailman parsed that syntax a
e newly added "db.sqlite" package in Python 2.5. In fact,
I guess my "db" will shadow the stdlib one, making it impossible to access. An
unique prefix for stdlib would solve this.
Giovanni Bajo
___
Python-Dev mailing list
Python-Dev@py
to say
>
>import xml.etree.ElementTree or cElementTree or \
> elementtree.ElementTree or lxml.etree as ET
Astonishingly cute. +1.
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo
interoperate with native libraries, while
Construct uses its to interoperate with binary protocols. I didn't see a good
reason why you shouldn't extend ctypes so to provide features that it is
currently missing. It looks like it could be easily extended to do so.
Giovanni Bajo
_
tutils? Is it
just for backward compatibility? If so, can't we have some kind of versioning
system?
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
need to do "import distutils2" to do,
eg, "setup.py develop"? This doesn't break backward compatibility.
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
ogramming/mstoolkit/
In fact, it would be great if the patches provided here were reviewed and
integrated into the official Python distutils.
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listi
ted in hearing folks' opinions about that, one way or the
> other.
This would be good. I believe pkg_resources is useful in 2.5 and in no way it
represents a not properly integrated layer of additional functionalities (like
setuptools is to distutils now). If you sincerely believe that pkg
ction implementations where possible. If the dispatching is done
correctly (through a fixed size virtual table for all the platforms),
BuildBot should be able to tell you quite fast if you forgot something.
At least, this setup would fix the docstring and the largefile issues raised
in your co
is to make all related functions accept a path
> object.
I'm not an expert in this field, but I believe that if you can make your Path
object support the so-called buffer interface, it would be directly usable for
functions like open() without an expl
ot;.gz"
Path.name.ext = ".tar"
Path.name.name.ext = ""
Which is exactly the *same* thing that os.path.splitext() does. And yes, I do
use splitext quite a lot.
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mai
her it is a real extension or not, and so does the simple,
clear, mechanical thing: it splits on the right-most dot.
And even if they know this "limitation" (if you want to call it so, I call it
"clear, consistent behaviour which applies to a not-always-consistently-used
convention"), the function is still useful.
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
()).
It's already there. It's called shlex.split(), and follows the semantic of a
standard UNIX shell, including escaping and other things.
>>> import shlex
>>> shlex.split(r"""Hey I\'m a "bad guy" for you""")
['Hey&
ould simply export the function the csv module uses to
> parse the actual data fields as a more prominent method, which
> accepts keyword arguments, instead of a Dialect-derived class.
I think you're over-generalizing a very simple problem. I believe that
st
make it less useful nor it
does provide a need for adding a new method to the string.
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
at the moment. I also proposed a slightly different semantic which would
prevent much boilerplate in the stdlib:
http://mail.python.org/pipermail/python-dev/2006-March/062582.html
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
still be succesfully used even if it requires some smallish
wrapper to achieve the exact functionality. I know I have been implementing
something similar very often. Since when do we need a full PEP process,
nitpicking the small details to death, just to add a simple function?
Giovanni Bajo
___
Bob Ippolito wrote:
> It seems that we should convert the crc32 functions in binascii,
> zlib, etc. to deal with unsigned integers.
+1!!
--
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/
1 - 100 of 130 matches
Mail list logo