Re: [Python-Dev] math.areclose ...?

2006-02-15 Thread Gustavo J. A. M. Carneiro
because of the new PEP 8, 'areclose' is really really hard to read. -- Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> The universe is always one step beyond logic ___ Python-Dev mailing list Python-Dev@python.org htt

[Python-Dev] Python modules should link to libpython

2006-02-08 Thread Gustavo J. A. M. Carneiro
open a bug report (maybe with patch), or is this controversial? -- Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> The universe is always one step beyond logic. ___ Python-Dev mailing list Python-Dev@python.org http://mail.

Re: [Python-Dev] Octal literals

2006-02-01 Thread Gustavo J. A. M. Carneiro
/me thinks of some examples: 644o # I _think_ the small 'o' cannot be easily confused with 0 or O, but.. 10h # hex.. hm.. but we already have 0x10 101b # binary Another possility is to extend the 0x syntax to non-hex, 0xff # hex 0o644 # octal 0b1101 # binar

Re: [Python-Dev] The path module PEP

2006-01-26 Thread Gustavo J. A. M. Carneiro
On Thu, 2006-01-26 at 16:17 +0100, Fredrik Lundh wrote: > Gustavo J. A. M. Carneiro wrote: > > > > If a URI class implemented the same methods, it would be something of a > > > question whether uri.joinpath('/foo/bar', 'baz') would return '/foo/baz

Re: [Python-Dev] The path module PEP

2006-01-26 Thread Gustavo J. A. M. Carneiro
On Wed, 2006-01-25 at 22:35 -0600, Ian Bicking wrote: > Gustavo J. A. M. Carneiro wrote: > > On a slightly different subject, regarding path / path, I think it > > feels much more natural path + path. Path.join is really just a string > > concatenation, except that it add

Re: [Python-Dev] The path module PEP

2006-01-25 Thread Gustavo J. A. M. Carneiro
feels much more natural path + path. Path.join is really just a string concatenation, except that it adds a path separator in the middle if necessary, if I'm not mistaken. Best regards. [1] Yes, I'm the kind of guy who hates struct timeval having tv_sec and tv_usec field members inste

Re: [Python-Dev] The path module PEP

2006-01-24 Thread Gustavo J. A. M. Carneiro
parated_by_underscores. And BTW, what does splitunc do? It really should have a more descriptive name. Regards. -- Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> The universe is always one step beyond logic ___ Python-

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-13 Thread Gustavo J. A. M. Carneiro
> > The first thing I need to do is figure out who stomped on self.attr. I have never done this, but in theory you could replace attr with a property whose getter uses sys._getframe() to log each modification of the attribute, thus easily find out who did "self.foo.attr = None". Alm

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-12 Thread Gustavo J. A. M. Carneiro
d logging are > okay, but I'm not sure how to make that distinction] IMHO, if getting a property involves a potentially long computation, it's better to have an accessor method rather than a property; xpto.getFoobar() hints right away the programmer that to access that value so

Re: [Python-Dev] Weak references: dereference notification

2005-11-10 Thread Gustavo J. A. M. Carneiro
Qui, 2005-11-10 às 13:57 +1300, Greg Ewing escreveu: > Gustavo J. A. M. Carneiro wrote: > > > OK, but what if it is a subclass of a builtin type, with instance > > variables? What if the PyObject is GC'ed but the ObjC object remains > > alive, and later you get a

Re: [Python-Dev] Weak references: dereference notification

2005-11-10 Thread Gustavo J. A. M. Carneiro
Qui, 2005-11-10 às 08:15 +0100, "Martin v. Löwis" escreveu: > Gustavo J. A. M. Carneiro wrote: > > OK, but what if it is a subclass of a builtin type, with instance > > variables? What if the PyObject is GC'ed but the ObjC object remains > > alive, and late

Re: [Python-Dev] Weak references: dereference notification

2005-11-09 Thread Gustavo J. A. M. Carneiro
On Wed, 2005-11-09 at 20:40 +0100, Ronald Oussoren wrote: > On 9-nov-2005, at 18:52, Gustavo J. A. M. Carneiro wrote: > > > Qua, 2005-11-09 às 09:23 -0800, Guido van Rossum escreveu: > >>>> Gustavo J. A. M. Carneiro wrote: > >>>>> I have come acr

Re: [Python-Dev] Weak references: dereference notification

2005-11-09 Thread Gustavo J. A. M. Carneiro
Qua, 2005-11-09 às 09:23 -0800, Guido van Rossum escreveu: > > > Gustavo J. A. M. Carneiro wrote: > > > > I have come across a situation where I find the current weak > > > > references interface for extension types insufficient. > > > > > > >

Re: [Python-Dev] Weak references: dereference notification

2005-11-09 Thread Gustavo J. A. M. Carneiro
Qua, 2005-11-09 às 11:50 -0500, Jim Fulton escreveu: > Gustavo J. A. M. Carneiro wrote: > > Hello, > > > > I have come across a situation where I find the current weak > > references interface for extension types insufficient. > > > > Currently

[Python-Dev] Weak references: dereference notification

2005-11-09 Thread Gustavo J. A. M. Carneiro
attribute that indicates an alternative type that should be used to create weak references: instead of the builtin weakref object, a subtype of it, so you can override tp_call. Does this sounds acceptable? Regards. [1] http://bugzilla.gnome.org/show_bug.cgi?id=320428 -- Gustavo J. A. M

Re: [Python-Dev] Divorcing str and unicode (no more implicitconversions).

2005-10-29 Thread Gustavo J. A. M. Carneiro
or instance, you could write: Δv = x1 - x0 if Δv < ε: return Instead of: delta_v = x1 - x0 if delta_v < epsilon: return But anyone that is supposed to understand the code will be able to read the delta and epsilon symbols. Regards.

Re: [Python-Dev] Coroutines, generators, function calling

2005-10-18 Thread Gustavo J. A. M. Carneiro
till... I wish for something that would avoid creating a nested coroutine. Maybe I'm asking for too much, I don't know. Just trying to get some feedback... Regards. -- Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> The universe is always one step

[Python-Dev] Coroutines, generators, function calling

2005-10-18 Thread Gustavo J. A. M. Carneiro
function. I don't suppose there could be a way to make the yield inside the subfunction have the same effect as if it was inside the function that called it? Perhaps some special notation, either at function calling or at function definition? -- Gustavo J. A. M. Carneiro <[EMAIL PROTEC

Re: [Python-Dev] Making Queue.Queue easier to use

2005-10-13 Thread Gustavo J. A. M. Carneiro
ck added. I guess this is partly an unix problem. There's no system call to say like "wake me up when one of these descriptors has data OR when this condition variable is set". Windows has WaitForMultipleObjects, which I suspect is quite a bit more powerful. Regards. -- Gus

Re: [Python-Dev] Pythonic concurrency - cooperative MT

2005-09-30 Thread Gustavo J. A. M. Carneiro
it is still > useful to keep GUI and network activities in separate threads. You are considering a scenario that seldom happens to design a solution that is far too complicated for most cases. Regards. -- Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> The

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-27 Thread Gustavo J. A. M. Carneiro
person) Not as compact as C's ?:, but more readable and intuitive. It's just like an if-else construct, but on a single line and () around to make it look like an expression instead of a statement. > > Reinhold > -- Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]> <[EM

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-03 Thread Gustavo J. A. M. Carneiro
's favorite anachronistic expression, even though the output doesn't go to a printer anymore. We all love it! I know Guido wanted a different name so that print() could be introduced in python 2 to allow a smooth transition to python 3, but the disadvantages in lost readability and famili

Re: [Python-Dev] Withdrawn PEP 288 and thoughts on PEP 342

2005-06-17 Thread Gustavo J. A. M. Carneiro
undecided on API for that really, currently the above is a lot more > verbose -) > > By contrast I really can't see how passing attributes in via .next() helps > this approach in any way (Not that that's a problem for us :). > > I CAN see though it helps if you're taki

Re: [Python-Dev] Summer of Code: Developing complete SSL support for Python

2005-06-05 Thread Gustavo J. A. M. Carneiro
rification. It's just false security. Maybe adding a callback asking the application what to do if certificate validation fails, so that application writers can show a GUI dialogue or something like that... Best regards. -- Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]> <[EMAIL PR

Re: [Python-Dev] PEP 340: propose to get rid of 'as' keyword

2005-05-04 Thread Gustavo J. A. M. Carneiro
On Wed, 2005-05-04 at 13:08 -0600, Shane Hathaway wrote: > Gustavo J. A. M. Carneiro wrote: > > In PEP 340 I read: > > > > block EXPR1 as VAR1: > > BLOCK1 > > > > I think it would be much clearer this (plus you save one keywor

[Python-Dev] PEP 340: propose to get rid of 'as' keyword

2005-05-04 Thread Gustavo J. A. M. Carneiro
. -- Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> The universe is always one step beyond logic. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mai

Re: [Python-Dev] a bunch of Patch reviews

2005-01-17 Thread Gustavo J. A. M. Carneiro
On Mon, 2005-01-17 at 23:12 +0100, "Martin v. Löwis" wrote: > Gustavo J. A. M. Carneiro wrote: > > If someone could take a look at: > > > > [ 1069624 ] incomplete support for AF_PACKET in socketmodule.c > > > The rule applies: five reviews, with re

Re: [Python-Dev] a bunch of Patch reviews

2005-01-17 Thread Gustavo J. A. M. Carneiro
uncates dwnld > > Some of them come from the last Python Bug Day, see > http://www.python.org/moin/PythonBugDayStatus > > > Thank you ! > > Regards, > > --Irmen de Jong > ___ > Python-Dev mailing list > Python-Dev

Re: [Python-Dev] an idea for improving struct.unpack api

2005-01-06 Thread Gustavo J. A. M. Carneiro
you need to read to decode a message in advance. Regards. > > Cheers, > mwh > -- Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> The universe is always one step beyond logic. smime.p7s Description: S/MIME cryptographic signature ___