Apache Mod-Python - Assigned: (MODPYTHON-16) Publisher : classes could be published

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > May 2005 > Assigned: (MODPYTHON-16) Publisher : classes could be published





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Assigned: (MODPYTHON-16) Publisher : classes could be published
Nicolas Lehuen (JIRA)

2005-05-01, 7:45 am

[ http://issues.apache.org/jira/brows...HON-16?page=all ]

Nicolas Lehuen reassigned MODPYTHON-16:
---------------------------------------

Assign To: Nicolas Lehuen

> Publisher : classes could be published
> --------------------------------------
>
> Key: MODPYTHON-16
> URL: http://issues.apache.org/jira/browse/MODPYTHON-16
> Project: mod_python
> Type: Improvement
> Versions: 3.1.3
> Reporter: Nicolas Lehuen
> Assignee: Nicolas Lehuen
> Priority: Minor


>
> Suppose this in a published Module :
> class index(object):
> def __init__(self,req,name):
> self.buffer ='<html><body><p>Hello, %s !</p></body></html>'%name
>
> def __str__(self):
> return self.buffer
> The publisher could notice that the index object is in fact a class, instantiate it and write the result of a str() conversion to the client.
> Why should we do this ?
> 1) we can ;)
> 2) this could be done by a class definition + a index function which does the job, but this way, we save a function definition.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com