On 26/09/17 17:56, Stefan Ram wrote:
> What happened? I woke up today in parens mood. So I typed:
>
> import( operator )
>
> Python told me that I should type:
>
> import operator
This is an interesting case:
>>> import (os, sys)
File "", line 1
import (os, sys)
^
SyntaxError
On Wed, Sep 27, 2017 at 5:25 PM, Peter Otten <__pete...@web.de> wrote:
> If you want that level of -- let's call it consistency -- you should either
> plead for
>
> foo = import("foo")
>
> to spell an import
Yeah no thanks. I work also with JavaScript, and there is no benefit
whatsoever to having
Stefan Ram wrote:
> Why do we newbies write »print 2«? Here's another hint.
> This is an original transcript of what happened to me today:
>
> |>>> import( operator )
> | File "", line 1
> |import( operator )
> | ^
> |SyntaxError: invalid syntax
> |
> |>>> import operator
> |
>
On Wed, 27 Sep 2017 02:48:41 +, Stefan Ram wrote:
> Steve D'Aprano writes:
>>"Do What I Mean" (DWIM) programming is a terrible idea.
>
> It's an anti-pattern, when one expects the implementation to follow
> different and contradicting rules and then somehow guess what was in
> the mind
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> But it's a pattern when it means to strip the language
> of useless boilerplate and still following consistent
> and simple rules. That was what made Python great.
Yes. Python syntax allows for *mentioning* an object, and also allows
for *calli
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> Why do we newbies write »print 2«? Here's another hint.
> This is an original transcript of what happened to me today:
[…]
> What happened? I woke up today in parens mood. So I typed:
>
> import( operator )
So, are you making the case that peo
On 2017-09-27 03:48, Stefan Ram wrote:
Steve D'Aprano writes:
"Do What I Mean" (DWIM) programming is a terrible idea.
It's an anti-pattern, when one expects the implementation
to follow different and contradicting rules and then
somehow guess what was in the mind of the programmer.
On Wed, 27 Sep 2017 06:00 am, Stefan Ram wrote:
> Python could have taken the indentation of the
> next line to tell that this is supposed to be
> a function definition and not a function call.
"Do What I Mean" (DWIM) programming is a terrible idea.
--
Steve
“Cheer up,” they said, “things cou
On Wed, Sep 27, 2017 at 6:00 AM, Stefan Ram wrote:
> r...@zedat.fu-berlin.de (Stefan Ram) writes:
>>Stefan Behnel writes:
>>>But would you also write this?
> ...
>>>def(func(a,b,c)):
>>>return(a+b+c)
>>No, this not.
>
> What I wrote was like:
>
> func( a, b, c )
> return a+b+c
>
On Wed, Sep 27, 2017 at 5:19 AM, Stefan Behnel wrote:
> print() and help() are definitely not worth being keywords. They do not
> impact the program flow, they don't do any assignments, nothing. That's why
> they are simple functions.
If anything, help() could benefit more from language support t
Op 2017-09-26, Stefan Ram schreef :
> What happened? I woke up today in parens mood. So I typed:
>
> import( operator )
>
> Python told me that I should type:
>
> import operator
>
> . Fine, Python conditioned me to omit the parens.
> So now I was in noparens mood. So I typed:
>
> help ope
Stefan Ram schrieb am 26.09.2017 um 17:56:
> Why do we newbies write »print 2«? Here's another hint.
> This is an original transcript of what happened to me today:
>
> |>>> import( operator )
> | File "", line 1
> |import( operator )
> | ^
> |SyntaxError: invalid syntax
> |
> |>>
12 matches
Mail list logo