Re: __builtin__ quote

2009-01-06 Thread Gabriel Genellina
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

Re: __builtin__ quote

2009-01-06 Thread John Machin
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

Re: __builtin__ quote

2009-01-06 Thread James Stroud
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

Re: __builtin__ quote

2009-01-06 Thread Chris Rebert
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

Re: __builtin__ quote

2009-01-06 Thread Chris Rebert
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()

Re: __builtin__ quote

2009-01-06 Thread Steven Woody
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

Re: __builtin__ quote

2009-01-06 Thread James Stroud
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

__builtin__ quote

2009-01-06 Thread Steven Woody
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