Why this code doesn't work ?

class sayName(app.page):
    path = '/sayName/(.*)'
    def GET(self, name = 'John'):
        return name

If I visit this url "http://myhost/sayName/joe"; , it prints 'joe'
but if I simply visit "http://myhost/sayName/";   without specifying a
name, it ignores the default value for name, and it prints nothing.

Is this a bug, or this is how it's supposed to work?
Should I indicate another path in the class instead?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to