The Artima Developer Community
Sponsored Link

Python Buzz Forum
Named Parameters? Aren't They All Named?

0 replies on 1 page.

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 0 replies on 1 page
Ramdas S

Posts: 60
Nickname: ramdaz
Registered: Sep, 2005

Ramdas S is a Python fan, writer and developer based out of Bangalore India
Named Parameters? Aren't They All Named? Posted: Oct 22, 2005 9:38 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Ramdas S.
Original Post: Named Parameters? Aren't They All Named?
Feed Title: Python tags from blog of s ramdas
Feed URL: http://ramdas.diqtech.com/feeds/tags/python/
Feed Description: Latest Pythonic experiements by S Ramdas
Latest Python Buzz Posts
Latest Python Buzz Posts by Ramdas S
Latest Posts From Python tags from blog of s ramdas

Advertisement

None of us wants to delve back into the block/method/param argument again, right? But we could still use a good answer. Dan Berger has an explanation of how Sydney got named parameters without need to plunder Ruby’s current method definitions.

 # A standard Ruby method declaration
 def foo(a, b, c=4)
   ...
 end

 # Ideal syntax
 foo(a:1, b:2, c:3) # a=1, b=2, c=3
 foo(a:1, b:2)      # a=1, b=2, c=4
 foo(1, 2, c:3)     # a=1, b=2, c=3
 foo(1, 2, 3)       # a=1, b=2, c=3

If you’d like to give Sydney a try, scan for tarballs on Evan’s blog. (Spotted on Late to the Party.)

Read: Named Parameters? Aren't They All Named?

Topic: Short list of things CherryPy should do Previous Topic   Next Topic Topic: Referrer logs

Sponsored Links



Google
  Web Artima.com   

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