[Python-ideas] Syntax for easy binding __name__, __module__, __qualname__ to arbitrary objects

Stefan Drees stefan at drees.name
Tue May 14 11:30:39 CEST 2013


Stephen J. Turnbull writes:
> Greg Ewing writes:
>
>   > My opinion is that imposing any such restriction on
>   > the use of "as" would be a foolish consistency that
>   > rules out a lot of natural-sounding constructs.
>
> Natural language is poorly fitted to be a programming language
> precisely because everything is possible.  Not all natural constructs
> need to be anointed as Python syntax.  It's especially important that
> constructs' semantics are indicated by their syntax.  I suspect that
> use of both "... NAME as EXPR" and "... EXPR as NAME" would come at a
> readability cost.
>
> We should also remember that there are lots of Python programmers to
> whom none of the syntax that is natural-sounding to the English-
> trained ear is particularly mnemonic.  The consistent application of a
> few regular rules of formation and failure to adhere to idiomatic
> variants is one important reason you can typically distinguish native
> from non-native writing at a glance.  I suspect that catering to this
> preference for consistency with existing simple rules will make it
> easier for anybody (regardless of mother tongue) to become fluent in
> Python. ...

Stepping in other peoples shoes and looking through their glasses in my 
experience does not always produce meaningful perceptions, esp. when 
core concepts of life - like "nativeness" of language - are involved.

There may be no excuse for a programmer to not learn the world language 
english, but prefering simple consistently applied rules will presumably 
enhance every language in creative use. The message is rarely inside a 
word or a simple phrase, isn't it?

All the best-native-ltr-but-non-native-English-greetings,

Stefan


More information about the Python-ideas mailing list