On Sun, 25 Sep 2005, James Stroud wrote:
> I'm into *real* purity. I would rather begin every script:
>
> from python import list, str, dict, sys, os
>
> Oh wait. I only use dict in less than 50% of my scripts:
>
> from python import list, str, sys, os
>
> That's better.
What? How exactly is th
I'm into *real* purity. I would rather begin every script:
from python import list, str, dict, sys, os
Oh wait. I only use dict in less than 50% of my scripts:
from python import list, str, sys, os
That's better.
On Saturday 03 September 2005 02:09, tiissa wrote:
> I was just stating you
"Michael J. Fromberger"
<[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> In article <[EMAIL PROTECTED]>,
> Rick Wotnaz <[EMAIL PROTECTED]> wrote:
>
>> You're right that there is no necessity for such a change. I
>> was not actually talking about importing *any* module in every
>> case, bu
Sybren Stuvel wrote:
> A programming language should not be ambiguous. The choice
> between importing a module and calling a function should not
> depend on the availability of a (local) variable.
Yeah, this behavior would be as ambiguous as if we had a system-defined
search-path for modules, whe
In article <[EMAIL PROTECTED]>,
Rick Wotnaz <[EMAIL PROTECTED]> wrote:
> You're right that there is no necessity for such a change. I was
> not actually talking about importing *any* module in every case,
> but rather about importing, say, 'sys' when, for example, sys.argv
> appeared in the co
Michael J. Fromberger wrote:
> While I'm mildly uncomfortable with the precedent that would be set
by including the contents of "sys" as built-ins, I must confess my
objections are primarily aesthetic: I don't want to see the built-in
namespace any more cluttered than is necessary -- or at le
"Michael J. Fromberger"
<[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> In article <[EMAIL PROTECTED]>,
> Rick Wotnaz <[EMAIL PROTECTED]> wrote:
>
>> Michael Hoffman <[EMAIL PROTECTED]> wrote in
>> news:[EMAIL PROTECTED]:
>>
>> > What would people think about adding sys to __builtins__
In article <[EMAIL PROTECTED]>,
Rick Wotnaz <[EMAIL PROTECTED]> wrote:
> Michael Hoffman <[EMAIL PROTECTED]> wrote in
> news:[EMAIL PROTECTED]:
>
> > What would people think about adding sys to __builtins__ so that
> > "import sys" is no longer necessary? This is something I must
> > add to eve
Rick Wotnaz enlightened us with:
> That is, a reference to xxx.func(), without a previous import of xxx
> *could* be resolvable automatically, at least for those modules that
> can be found in a standard location.
-1 on that one. If I want to use a module, I'll write an import
statement for it. Th
"Terry Reedy" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
>
> "Colin J. Williams" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Rick Wotnaz wrote:
>>> +1 here. As far as I'm concerned, both os and sys could be
>>> special- cased that way. That said, I would guess the
"Colin J. Williams" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Rick Wotnaz wrote:
>> +1 here. As far as I'm concerned, both os and sys could be special-
>> cased that way. That said, I would guess the likelihood of that
>> happening is 0.
>>
> +1 for both.
Some people might pr
Rick Wotnaz wrote:
> Michael Hoffman <[EMAIL PROTECTED]> wrote in
> news:[EMAIL PROTECTED]:
>
>
>>What would people think about adding sys to __builtins__ so that
>>"import sys" is no longer necessary? This is something I must
>>add to every script I write that's not a one-liner since they
>>hav
Paul Watson wrote:
>This sounds pretty interesting. How about a switch to invoke this
>handling for the one-liner crowd and those who wish to use it?
>
>
>
>Somehow, I never heard any C programmers suggest that the default
>processing not include the need for:
>
>#include
>
>
I think it
Michael Hoffman wrote:
> To the contrary, I agree with Larry Wall that laziness is one of the
> cardinal virtues of a programmer.
There's lazy and too lazy.
You don't want to be too lazy to even get out of bed to code in Python.
Of course, with Perl, that's entirely another mattress^Wmatter.
>
Steve Holden wrote:
> Rick Wotnaz wrote:
>
>> Michael Hoffman <[EMAIL PROTECTED]> wrote in
>> news:[EMAIL PROTECTED]:
>>
>>> What would people think about adding sys to __builtins__ so that
>>> "import sys" is no longer necessary? This is something I must
>>> add to every script I write that's not
tiissa wrote:
> A developper should not be too lazy to add one small line in a complete
> script/module.
To the contrary, I agree with Larry Wall that laziness is one of the
cardinal virtues of a programmer. Although my personal desire to be lazy
is not at issue here--I always start new scripts
Michael Hoffman a écrit :
> MrJbQ7 wrote:
>
> > Besides, a better way is to use your ~/.pythonrc file for customizing
> > according to your needs.
> >
> > A simple:
> >
> > echo "import sys, os" >> ~./pythonrc
> >
> > will do the job.
>
> Until someone else tries to use your script or module.
A
MrJbQ7 wrote:
> Steve Holden wrote:
>
>>I wonder if it would be worth special-casing the AttributeError [snip]
>
> What is it that Tim Peters said? "Special cases aren't special
> enough..."
That suggestion is a little too much magic for me.
> Besides, a better way is to use your ~/.pythonrc fi
Steve Holden wrote:
> I wonder if it would be worth special-casing the AttributeError [snip]
What is it that Tim Peters said? "Special cases aren't special
enough..."
Besides, a better way is to use your ~/.pythonrc file for customizing
according to your needs.
A simple:
echo "import sys, os"
Rick Wotnaz wrote:
> Michael Hoffman <[EMAIL PROTECTED]> wrote in
> news:[EMAIL PROTECTED]:
>
>
>>What would people think about adding sys to __builtins__ so that
>>"import sys" is no longer necessary? This is something I must
>>add to every script I write that's not a one-liner since they
>>hav
Michael Hoffman <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> What would people think about adding sys to __builtins__ so that
> "import sys" is no longer necessary? This is something I must
> add to every script I write that's not a one-liner since they
> have this idiom at the bottom:
What would people think about adding sys to __builtins__ so that
"import sys" is no longer necessary? This is something I must add to
every script I write that's not a one-liner since they have this idiom
at the bottom:
if __name__ == "__main__":
sys.exit(main(sys.argv[1:]))
Additionally,
22 matches
Mail list logo