By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,748 Members | 1,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,748 IT Pros & Developers. It's quick & easy.

Re: parameterized classes

P: n/a
John Tantalo wrote:
I really wish I could create a class whose instances were classes that
subclassed BaseRequestHandler. Is this possible, or is there a better
way than my approach here? Or am I crazy?
no you so much as your code. unfortunately, it fails the "decipher in
allocated time slot" test, though, so I hope someone else will have time
to untangle it for you.
And I may be dense, so if there is an easier way to stream sockets as
line streams, please let me know. I honestly don't think it should be
this difficult to implement a socket handler this simple.
there's a StreamRequestHandler class in SocketServer that buffered
streams via the rfile and wfile attributes.

</F>

Jul 24 '08 #1
Share this Question
Share on Google+
1 Reply

P: n/a
John Tantalo wrote:
I really wish I could create a class whose instances were classes that
subclassed BaseRequestHandler. Is this possible, or is there a better
way than my approach here? Or am I crazy?
You may use type:

type('MuSubclass', (Base, ), dict(a1=1, a2=2, ...))
Jul 24 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.