Re: [Python-Dev] Evaluated cmake as an autoconf replacement

2009-04-12 Thread Giovanni Bajo
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 Python-Dev@python.org http://mail.python.org/mailman/listinfo/pyth

Re: [Python-Dev] Evaluated cmake as an autoconf replacement

2009-04-12 Thread Giovanni Bajo
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

Re: [Python-Dev] PEP 372 -- Adding an ordered directory to collections ready for pronouncement

2009-03-02 Thread Giovanni Bajo
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

Re: [Python-Dev] PEP 374 (DVCS) now in reST

2009-01-26 Thread Giovanni Bajo
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

Re: [Python-Dev] __del__ and tp_dealloc in the IO lib

2009-01-23 Thread Giovanni Bajo
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

Re: [Python-Dev] __del__ and tp_dealloc in the IO lib

2009-01-23 Thread Giovanni Bajo
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

Re: [Python-Dev] __del__ and tp_dealloc in the IO lib

2009-01-22 Thread Giovanni Bajo
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

Re: [Python-Dev] I would like an svn account

2009-01-09 Thread Giovanni Bajo
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 Python-Dev@python.org http://mail.python.org/mailman

Re: [Python-Dev] [Python-3000] 2.6.1 and 3.0

2008-11-27 Thread Giovanni Bajo
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

Re: [Python-Dev] [Python-3000] 2.6.1 and 3.0

2008-11-26 Thread Giovanni Bajo
er, on which we can start doing some evaluations. -- Giovanni Bajo Develer S.r.l. http://www.develer.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] [Python-3000] 2.6.1 and 3.0

2008-11-26 Thread Giovanni Bajo
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 Python-Dev@python.org

Re: [Python-Dev] [Python-3000] 2.6.1 and 3.0

2008-11-26 Thread Giovanni Bajo
more features than those I notice within Python's installer. -- Giovanni Bajo Develer S.r.l. http://www.develer.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Fwd: Removal of GIL through refcounting removal.

2008-11-02 Thread Giovanni Bajo
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

[Python-Dev] Troubles with Roundup

2008-06-16 Thread Giovanni Bajo
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

Re: [Python-Dev] Warn about mktemp once again?

2008-04-29 Thread Giovanni Bajo
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 Python-Dev@python.org http://ma

Re: [Python-Dev] Warn about mktemp once again?

2008-04-28 Thread Giovanni Bajo
on to have mkstemp() return the fd (except backward compatibility)? -- Giovanni Bajo Develer S.r.l. http://www.develer.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Building Python with CMake

2007-07-13 Thread Giovanni Bajo
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

Re: [Python-Dev] Subversion branch merging

2007-07-13 Thread Giovanni Bajo
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 Python-Dev@python.org http://

Re: [Python-Dev] itertools addition: getitem()

2007-07-10 Thread 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

Re: [Python-Dev] Py2.6 buildouts to the set API

2007-05-19 Thread Giovanni Bajo
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 ___

Re: [Python-Dev] svn logs

2007-05-09 Thread Giovanni Bajo
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

Re: [Python-Dev] New Super PEP

2007-05-02 Thread Giovanni Bajo
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

Re: [Python-Dev] New Super PEP

2007-05-02 Thread Giovanni Bajo
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 Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Status of thread cancellation

2007-03-16 Thread Giovanni Bajo
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

Re: [Python-Dev] Encouraging developers

2007-03-05 Thread 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

Re: [Python-Dev] Encouraging developers

2007-03-05 Thread Giovanni Bajo
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

Re: [Python-Dev] Making builtins more efficient

2007-02-21 Thread Giovanni Bajo
mp;atid=305470&aid=1616125&group_id=5470 -- Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Py2.6 ideas

2007-02-15 Thread Giovanni Bajo
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

Re: [Python-Dev] New syntax for 'dynamic' attribute access

2007-02-13 Thread Giovanni Bajo
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

Re: [Python-Dev] New syntax for 'dynamic' attribute access

2007-02-13 Thread Giovanni Bajo
eturn result return self.http_error_default(url, fp, errcode, errmsg, headers) -- Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/pyth

[Python-Dev] __dir__ and __all__

2007-02-03 Thread Giovanni Bajo
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

Re: [Python-Dev] Python's C interface for types

2007-01-26 Thread Giovanni Bajo
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 ==

Re: [Python-Dev] [Python-checkins] buildbot failure in amd64 gentoo 2.5

2007-01-23 Thread Giovanni Bajo
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.

Re: [Python-Dev] file(file)

2007-01-13 Thread Giovanni Bajo
;t see how this can ever happen in the 2.x serie... -- Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

[Python-Dev] fpectl: does a better implementation make sense?

2006-11-30 Thread Giovanni Bajo
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

[Python-Dev] Summer of Code: zipfile?

2006-11-12 Thread Giovanni Bajo
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 Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.pytho

Re: [Python-Dev] Importing .pyc in -O mode and vice versa

2006-11-06 Thread 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

Re: [Python-Dev] Importing .pyc in -O mode and vice versa

2006-11-06 Thread Giovanni Bajo
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 _

Re: [Python-Dev] Why spawnvp not implemented on Windows?

2006-10-13 Thread Giovanni Bajo
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 Python-Dev@python.org http://mail.python.org/mailman/lis

[Python-Dev] [py3k] Re: Proposal: No more standard library additions

2006-10-13 Thread Giovanni Bajo
I apologize, this had to go to [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Proposal: No more standard library additions

2006-10-13 Thread Giovanni Bajo
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 Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Python 2.5 performance

2006-10-12 Thread Giovanni Bajo
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 Python-Dev@python.org http://m

Re: [Python-Dev] PEP 355 status

2006-09-30 Thread Giovanni Bajo
y what exactly is "unrelated" for you. Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Removing __del__

2006-09-23 Thread Giovanni Bajo
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 Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Minipython

2006-09-23 Thread 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

Re: [Python-Dev] New relative import issue

2006-09-23 Thread Giovanni Bajo
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

Re: [Python-Dev] GCC patch for catching errors in PyArg_ParseTuple

2006-09-22 Thread Giovanni Bajo
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

Re: [Python-Dev] New relative import issue

2006-09-21 Thread Giovanni Bajo
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 Python-Dev@python.org http://mail.python.org/mai

Re: [Python-Dev] Testsuite fails on Windows if a space is in the path

2006-09-18 Thread 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 Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscr

Re: [Python-Dev] Unicode Imports

2006-09-08 Thread Giovanni Bajo
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 __

Re: [Python-Dev] Error while building 2.5rc1 pythoncore_pgo on VC8

2006-09-04 Thread Giovanni Bajo
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 Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mai

Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str andunicode asdictionarykeys

2006-08-05 Thread Giovanni Bajo
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

Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread Giovanni Bajo
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

Re: [Python-Dev] unicode hell/mixing str and unicode as dictionary keys

2006-08-04 Thread Giovanni Bajo
and, in case there's interest, the discussion moved to the py3k list. Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Python 2.4, VS 2005 & Profile Guided Optmization

2006-07-23 Thread Giovanni Bajo
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 Python-Dev@python.org http://mail.python.org/mailman/listinfo/pyth

Re: [Python-Dev] Document performance requirements?

2006-07-23 Thread Giovanni Bajo
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&

Re: [Python-Dev] Document performance requirements?

2006-07-21 Thread 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 Python-Dev@python.org

Re: [Python-Dev] new security doc using object-capabilities

2006-07-20 Thread Giovanni Bajo
*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 _

Re: [Python-Dev] new security doc using object-capabilities

2006-07-20 Thread Giovanni Bajo
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

Re: [Python-Dev] new security doc using object-capabilities

2006-07-20 Thread 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 Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: ht

Re: [Python-Dev] Strategy for converting the decimal module to C

2006-07-18 Thread Giovanni Bajo
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 __

Re: [Python-Dev] Dynamic module namspaces

2006-07-15 Thread Giovanni Bajo
ill works...). SIP is free and generic btw, you may want to consider it as a tool. -- Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/opti

Re: [Python-Dev] Community buildbots (was Re: User's complaints)

2006-07-14 Thread Giovanni Bajo
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

Re: [Python-Dev] Community buildbots (was Re: User's complaints)

2006-07-14 Thread Giovanni Bajo
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 Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Community buildbots

2006-07-14 Thread Giovanni Bajo
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

Re: [Python-Dev] Community buildbots

2006-07-13 Thread Giovanni Bajo
lasses" and "from __future__ import unicode_literals" would be really welcome, and would smooth the Py3k migration process -- Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listin

Re: [Python-Dev] Community buildbots (was Re: User's complaints)

2006-07-13 Thread Giovanni Bajo
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

Re: [Python-Dev] Switch and static, redux

2006-07-07 Thread Giovanni Bajo
ally have its first religious wars over indentation AT LAST! :) Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Explicit Lexical Scoping (pre-PEP?)

2006-07-04 Thread Giovanni Bajo
> "implicit" scoping rule that exists in Python today. Interesting. What if for-loops implicitally used "my" on the iteration variable? That would solve the binding problem we were discussing and make lambdas "Do The Right Thing"(TM) when used in loops. -- Giovanni Ba

Re: [Python-Dev] 2.5 and beyond

2006-07-01 Thread Giovanni Bajo
not really looked up only at run-time, but there's "something" going on even at function definition time. I don't see anything wrong if lambdas (or nested scopes) did the same for names provably coming from the outer scope. -- Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] 2.5 and beyond

2006-06-30 Thread Giovanni Bajo
[Giovanni Bajo] > Yes but: > >>>> a = [] >>>> for i in range(10): > ... a.append(lambda: i) > ... >>>> print [x() for x in a] > [9, 9, 9, 9, 9, 9, 9, 9, 9, 9] > > This subtle semantic of lambda is quite confusing, and still forces peop

Re: [Python-Dev] 2.5 and beyond

2006-06-30 Thread Giovanni Bajo
nge(10): ... a.append(lambda: i) ... >>> print [x() for x in a] [9, 9, 9, 9, 9, 9, 9, 9, 9, 9] This subtle semantic of lambda is quite confusing, and still forces people to use the "i=i" trick. Giovanni Bajo ___ Python-Dev mailing

Re: [Python-Dev] PEP 328 and PEP 338, redux

2006-06-29 Thread Giovanni Bajo
to a name with the same naming convention) - Often requires explicit sys.exit() which breaks python -i - Broken by -mpkg.mod, and we ended up with another __magic_name__ just because of this. - (new) Defining a main() function is already the preferred style for reusability, so __main__ woul

Re: [Python-Dev] PEP 328 and PEP 338, redux

2006-06-29 Thread Giovanni Bajo
fact that importing a module equals evaluating all of its statement one by one). A function called __main__ which is magically invoked by the python itself is much much easier to grasp. A different, clearer spelling for the if condition (like: "if not __imported__") would help as well. --

Re: [Python-Dev] PEP 328 and PEP 338, redux

2006-06-28 Thread Giovanni Bajo
ing preventing it from being added in 2.6. It won't break existing code with the "if name == main" paradigm. -- Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] PEP 328 and PEP 338, redux

2006-06-27 Thread Giovanni Bajo
ore! > > So, such modules would require a minor change to run under -m. Is > this > actually a problem, or is it a new feature? This is where I wonder why the "def __main__()" PEP was rejected in the first place. It would have

Re: [Python-Dev] Moving the ctypes repository to python.org

2006-06-23 Thread Giovanni Bajo
erates. -- Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Python 2.4 extensions require VC 7.1?

2006-06-16 Thread Giovanni Bajo
was to use VS 2003 for another cycle (i.e. 2.5). But the fact that VS 2003 is no longer available for download is an important fact, and we might want to rediscuss the issue. Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.p

Re: [Python-Dev] External Package Maintenance (was Re: Please stopchanging wsgiref on the trunk)

2006-06-12 Thread Giovanni Bajo
r own releases, and merge changes back and forth much more simply (since if they reside on the same repository, you can use svnmerge-like features to find out modifications and whatnot). Maintaining an external repository seems like a larger effort, and probably not worth it. Giovanni Bajo __

Re: [Python-Dev] Source control tools

2006-06-12 Thread Giovanni Bajo
and whatnot. It's basically "unportable" by design to native Windows. I guess the only sane approach is to use it under Cygwin. IMO this is a big no-go for real Windows developers. Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] External Package Maintenance (was Re: Please stopchanging wsgiref on the trunk)

2006-06-12 Thread Giovanni Bajo
nnot find a way to maintain it properly. The fact that there hundreds of unreviewed patches to the standard library made by wannabe contributors is a blatant sign that something *can* be improved. -- Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] UUID module

2006-06-12 Thread Giovanni Bajo
of stuff, since it's bundled in 2.5. I don't know any Python sys/os method to get a pointer to that directory. Another thing that you might do is to drop those absolute system directories altogether. After all, ipconfig should always be in the path. As a last note, you are parsing ipco

Re: [Python-Dev] UUID module

2006-06-11 Thread Giovanni Bajo
ess it's better if each function catches its own exceptions, and either return None or raise a common exception (like a class _GetNodeError(RuntimeError)) which is then caught. Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Subversion repository question - back up to older versions

2006-06-09 Thread Giovanni Bajo
gt; added a question to the dev faq with this as the answer. Hope you > don't mind... It should show up on > > http://www.python.org/dev/faq/ > > as question 3.23 in a few minutes. Sure, I'm glad to help. You may want to revise it a little since it wasn't

Re: [Python-Dev] Subversion repository question - back up to older versions

2006-06-09 Thread Giovanni Bajo
information if you later run "svn info" on the working copy (as you're probably going to forget what [/branches/release24-maint, 39619] means pretty soon, while [/tags/r242, NNN] is more clear). Giovanni Bajo ___ Python-Dev mailing list

Re: [Python-Dev] Converting crc32 functions to use unsigned

2006-05-30 Thread 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 Python-Dev@python.org http://mail.python.org/mailman/listinfo/

Re: [Python-Dev] Proposal for a new itertools function: iwindow

2006-05-27 Thread Giovanni Bajo
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 ___

Re: [Python-Dev] whatever happened to string.partition ?

2006-05-25 Thread Giovanni Bajo
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 Python-Dev@python.org

Re: [Python-Dev] New string method - splitquoted

2006-05-18 Thread Giovanni Bajo
make it less useful nor it does provide a need for adding a new method to the string. -- Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] New string method - splitquoted

2006-05-18 Thread Giovanni Bajo
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

Re: [Python-Dev] New string method - splitquoted

2006-05-18 Thread Giovanni Bajo
()). 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&

Re: [Python-Dev] Alternative path suggestion

2006-05-06 Thread Giovanni Bajo
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 Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Alternative path suggestion

2006-05-05 Thread Giovanni Bajo
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 Python-Dev@python.org http://mai

Re: [Python-Dev] Alternative path suggestion

2006-05-05 Thread Giovanni Bajo
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

Re: [Python-Dev] [Python-checkins] r45898 - in python/trunk:Lib/test/test_os.py Lib/test/test_shutil.py Misc/NEWSModules/posixmodule.c

2006-05-04 Thread Giovanni Bajo
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

Re: [Python-Dev] setuptools: past, present, future

2006-04-21 Thread Giovanni Bajo
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

Re: [Python-Dev] Visual studio 2005 express now free

2006-04-21 Thread Giovanni Bajo
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 Python-Dev@python.org http://mail.python.org/mailman/listi

Re: [Python-Dev] setuptools in the stdlib

2006-04-18 Thread Giovanni Bajo
need to do "import distutils2" to do, eg, "setup.py develop"? This doesn't break backward compatibility. Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] setuptools in the stdlib

2006-04-18 Thread 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 Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] adding Construct to the standard library?

2006-04-18 Thread Giovanni Bajo
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 _

  1   2   >