Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Verbose and flexible args and kwargs syntax

Reply
Thread Tools

Verbose and flexible args and kwargs syntax

 
 
Eelco Hoogendoorn
Guest
Posts: n/a
 
      12-11-2011
> Yes, that's just a strict keywordification of the * and ** symbols.
> The same argument could be made for eliminating the standard algebraic
> + operator and replacing it with a keyword "__add__". I don't think
> that's worthwhile.



Well, its not quite the same in the sense that algebraic operators are
essentially part of 'natural language', or at least extremely widely
adopted. They have earned their own special symbols. Argument
packing/unpacking is a very specific thing; a small corner of a
particular programming language.

However, as seen in the light of python 3 head-tail syntax, perhaps the
above is not quite true, and one could argue that packing/unpacking of
collections is indeed a quite general concept, deserving of its own
symbols. Breaking uniformity with that use case would also be a bad
thing; ideally, a verbose alternative to all occurances of collection
packing/unpacking would be available.

That said, a more verbose and flexible syntax would be desirable there
too; as of now, the tail is always a list. I havnt read the discussions
leading up to those design decisions, but that seems like a compromise
to me; something like head,tuple(tail) = someiterable would be
preferrable there too, id say
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Verbose and flexible args and kwargs syntax Eelco Hoogendoorn Python 88 12-17-2011 08:02 PM
Verbose and flexible args and kwargs syntax Eelco Hoogendoorn Python 0 12-12-2011 09:12 AM
Verbose and flexible args and kwargs syntax Eelco Hoogendoorn Python 0 12-11-2011 11:53 PM
Verbose and flexible args and kwargs syntax Eelco Hoogendoorn Python 1 12-11-2011 10:19 PM
Verbose and flexible args and kwargs syntax Eelco Hoogendoorn Python 0 12-11-2011 02:58 PM



Advertisments