The Artima Developer Community
Sponsored Link

Weblogs Forum
Readable Method Calls in Java

30 replies on 3 pages. Most recent reply: Aug 4, 2005 10:52 PM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 30 replies on 3 pages [ « | 1 2 3 ]
Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Built-int Feature in Python Posted: Aug 4, 2005 10:52 PM
Reply to this message Reply
> It is more handcraft than in Python indeed to provide that feature.

I'm not entirely sure what this sentence means (after several passes, it is still foiling my parser), but this Python:
def foo( **params ):
for key in params:
print '%s -> %s' % (key, params[key])

foo( a='one', b='two', stuff=[1,2,3] )

Will result in this output:
a -> one
b -> two
stuff -> [1, 2, 3]

Flat View: This topic has 30 replies on 3 pages [ « | 1  2  3 ]
Topic: Generics vs. Dynamic Checking Previous Topic   Next Topic Topic: Are Tests First Class Clients?

Sponsored Links


Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use