[2s.mk-friends] Сподели Знаење сабота

Дамјан Георгиевски penguinista at mail.net.mk
Mon Jul 6 00:26:21 UTC 2009

> @expose("/")
> class index:
>     def GET(self, req):
>         return Response(u'Hello World!')

BTW, заборавив да споменам, ова @expose(....) пред класа е можно само во 
Python 2.6 и 3.x, постарите Python-и не подржуваат class decorators, само 
function decorators.

Еквивалентот во Python 2.5 e
class index:
index = expose('/')(index)

дамјан ( http://softver.org.mk/damjan/ )

"The moment you commit and quit holding back, all sorts of unforseen
incidents, meetings and material assistance will rise up to help you.
The simple act of commitment is a powerful magnet for help." -- Napoleon

More information about the Ossm-members mailing list