On 10/9/06, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> At Saturday 7/10/2006 04:35, hanumizzle wrote:
>
> > > >As the first post said "...couldn't python (in theory)...", I
> > was discussing
> > > >if it would be possible for python (in some future version) to manage the
> > > >literals so tha
At Saturday 7/10/2006 04:35, hanumizzle wrote:
> >As the first post said "...couldn't python (in theory)...", I
was discussing
> >if it would be possible for python (in some future version) to manage the
> >literals so that they use the constructors in the __builtin__ module, I
> >didn't say it
On 10/7/06, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> At Friday 6/10/2006 06:58, Maric Michaud wrote:
>
> >As the first post said "...couldn't python (in theory)...", I was discussing
> >if it would be possible for python (in some future version) to manage the
> >literals so that they use the
At Friday 6/10/2006 06:58, Maric Michaud wrote:
As the first post said "...couldn't python (in theory)...", I was discussing
if it would be possible for python (in some future version) to manage the
literals so that they use the constructors in the __builtin__ module, I
didn't say it works actua
On Oct 6, 4:58 am, Maric Michaud <[EMAIL PROTECTED]> wrote:
> As the first post said "...couldn't python (in theory)...", I was discussing
> if it would be possible for python (in some future version) to manage the
> literals so that they use the constructors in the __builtin__ module, I
> didn't
Le jeudi 05 octobre 2006 20:24, Steve Holden a écrit :
> >>> class mystr(oldstr):
> ... def __new__(*a, **kw):
> ... print "called:", a, kw
> ...
you don't return the string here...
> >>> import __builtin__
> >>> __builtin__.str = mystr
> >>>
> Readline internal error
> Traceb
Maric Michaud wrote:
> Le jeudi 05 octobre 2006 15:52, Steve Holden a écrit :
>
>>>But what prevents to interpret literals as a call to __builtins__ objects
>>>and functions ? optimization ? what else ?
>>
>>
>>When are literals interpreted? During translation into bytecode.
>
>
> agreed, but wh
Le jeudi 05 octobre 2006 15:52, Steve Holden a écrit :
> > But what prevents to interpret literals as a call to __builtins__ objects
> > and functions ? optimization ? what else ?
>
>
> When are literals interpreted? During translation into bytecode.
agreed, but what's the problem with this ?
We
Maric Michaud wrote:
> Le jeudi 05 octobre 2006 14:20, Steve Holden a écrit :
>
>>Unfortunately the literals are interpreted during bytecode generation,
>>before the compiled program is available, and your modifications to
>>__builtns__ haven't been made, so the answer is "no", I'm afraid.
>
>
>
Le jeudi 05 octobre 2006 14:20, Steve Holden a écrit :
> Unfortunately the literals are interpreted during bytecode generation,
> before the compiled program is available, and your modifications to
> __builtns__ haven't been made, so the answer is "no", I'm afraid.
But what prevents to interpret l
Steve Holden wrote:
> Unfortunately the literals are interpreted during bytecode generation,
> before the compiled program is available, and your modifications to
> __builtns__ haven't been made, so the answer is "no", I'm afraid.
Ah! That makes sense. I guess the only way to do it would be to add
MonkeeSage wrote:
> I know that python doesn't allow extending built-in objects like the
> str class; but you can subclass them using a class of the same name and
> thus shadow them to get the same general effect (albeit you have to use
> the explicit constructor rather than literals).
>
> class s
I know that python doesn't allow extending built-in objects like the
str class; but you can subclass them using a class of the same name and
thus shadow them to get the same general effect (albeit you have to use
the explicit constructor rather than literals).
class str(str):
def display(self):
13 matches
Mail list logo