En Tue, 06 Jan 2009 06:56:36 -0200, James Stroud
escribió:
Steven Woody wrote:
On Tue, Jan 6, 2009 at 4:42 PM, James Stroud
wrote:
py> import __builtin__
py> __builtin__.abs is abs
True
Does that mean someone did 'import * from __builtin__' when python
startup?
In terms of the ex
On Jan 6, 7:38 pm, "Steven Woody" wrote:
> Hi,
>
> I am a new leaner and I get a question: abs() is a member of
> __builtin__ module, but why should I use abs() rather than
> __builtin__.abs() ? Thanks.
Fewer keystrokes.
--
http://mail.python.org/mailman/listinfo/python-list
Steven Woody wrote:
On Tue, Jan 6, 2009 at 4:42 PM, James Stroud wrote:
py> import __builtin__
py> __builtin__.abs is abs
True
Does that mean someone did 'import * from __builtin__' when python startup?
In terms of the exact implementation of the cPython interpreter, I don't
know. But
On Tue, Jan 6, 2009 at 12:38 AM, Steven Woody wrote:
> Hi,
>
> I am a new leaner and I get a question: abs() is a member of
> __builtin__ module, but why should I use abs() rather than
> __builtin__.abs() ? Thanks.
To clarify, having __builtin__ is just the language's way of reifying
the notion
On Tue, Jan 6, 2009 at 12:47 AM, Steven Woody wrote:
> On Tue, Jan 6, 2009 at 4:42 PM, James Stroud wrote:
>> Steven Woody wrote:
>>>
>>> Hi,
>>>
>>> I am a new leaner and I get a question: abs() is a member of
>>> __builtin__ module, but why should I use abs() rather than
>>> __builtin__.abs()
On Tue, Jan 6, 2009 at 4:42 PM, James Stroud wrote:
> Steven Woody wrote:
>>
>> Hi,
>>
>> I am a new leaner and I get a question: abs() is a member of
>> __builtin__ module, but why should I use abs() rather than
>> __builtin__.abs() ? Thanks.
>
> It saves typing.
>
> This might help your underst
Steven Woody wrote:
Hi,
I am a new leaner and I get a question: abs() is a member of
__builtin__ module, but why should I use abs() rather than
__builtin__.abs() ? Thanks.
It saves typing.
This might help your understanding:
py> import __builtin__
py> __builtin__.abs is abs
True
James
Hi,
I am a new leaner and I get a question: abs() is a member of
__builtin__ module, but why should I use abs() rather than
__builtin__.abs() ? Thanks.
--
http://mail.python.org/mailman/listinfo/python-list