With a function defined as:

----------------------------
        def default(self, *arg, **kw):
----------------------------


Is there a way to grab a parameter using less code than this?
----------------------------
                try:
                        param1 = str(kw['param1'])
                except KeyError:
                        param1 =""
----------------------------

The function would need to be able to cope with being passed a
parameter, and using a default otherwise.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to