Suggestions for python 2

Markus Stenberg mstenber at cc.Helsinki.FI
Tue Jan 18 04:00:35 EST 2000


Edward Welbourne <eddy at vortigen.demon.co.uk> writes:
> OK, some examples would be a good idea, and Evan has shown me some ways
> of saying tunneling clearer ... Evan has at least one further change he
> wants here but I'd rather leave it to him to describe ... if only for
> the hope that he'll express why this is a useful idea - albeit he spells
> it different - and he expresses it better than I do.
> I only know how to design and implement stuff.
> Computers understand my better than folk do.
>
> 
> Three new kinds of argument come into being (with my given spelling):
>   * safe tunnel: after both * and **
>   * keyword-only: after * but not **
>   * positional-only: after ** but not *

Ugh.. *puke* this looks like ugly hack from hell designed to counter
Python's original debatable deficiency in namescape/scoping department.
All examples I've seen to date have just provided ways of countering
current scoping, and I'd rather see Python's scope system changing
(possibly something along the lines mr. Skaller of Viper fame proposed)
than language getting more and more cryptic with very little gain to show
for it. 

Question is: "Why"?

Admittedly, there is some slight convenience in whole proposal, but
additional syntax isn't good idea, and I'd hate to try to describe features
like that to general public. And AFAIK Python's mostly based on KISS
principle.

<snip>

> You want to let your function see some value you can compute, but you
> want it to be able to take arbitrarily many positional args; or you need
> to be sure your caller can't mess with one of your args.

Arguably, this might be desirable; but, language extensions like ** sound
downright ugly. 

>   def filename(*fragments, **, root=os.getcwd()):

Why not just

def filename(*fragments, root=os.getcwd()): ?

It's not allowed right now, but looks pretty clear to me, and it's logical
extension to current form.

<snip>

> --
> Recipient-list truncated to python-list,

-- 
Finger mstenber at sirppi.helsinki.fi for my PGP public key:
pub  1024/5DAC7D21 1994/04/20 Markus Stenberg <fingon at iki.fi>
Key fingerprint = 25 BA 5B 57 F1 77 0C F0  2A D0 E6 3A 2E 81 6F D3



More information about the Python-list mailing list