Work started: (MODPYTHON-16) Publisher : classes could be published
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Mod-Python > Work started: (MODPYTHON-16) Publisher : classes could be published




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Work started: (MODPYTHON-16) Publisher : classes could be published  
Nicolas Lehuen (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-01-05 12:45 PM

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

Work on MODPYTHON-16 started by 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, insta
ntiate 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.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:05 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register