473,386 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Re: parameterized classes

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
1 1145
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Christian Tismer | last post by:
Hi Pythonistas, just as a small comment on the side-effects of the rather new concept of local functions with access to their scope: This concept can be used to avoid having extra classes...
1
by: gary b | last post by:
Hello When I use a PreparedStatement (in jdbc) with the following query: SELECT store_groups_id FROM store_groups WHERE store_groups_id IS NOT NULL AND type = ? ORDER BY group_name
7
by: Wayne Wood | last post by:
i posted this problem on microsoft.public.excel.programming, but there's no one replied till now. because this issue is time critical, i put it here to try my fortune :) ...
761
by: Neo-LISPer | last post by:
Hey Recently, I researched using C++ for game programming and here is what I found: C++ game developers spend a lot of their time debugging corrupted memory. Few, if any, compilers offer...
16
by: christopher diggins | last post by:
It appears that the following is not considered a class: template<typename T> class C { }; ? So officially is this considered: a class, a template, a class template, or a template class? I...
8
by: deko | last post by:
I'm trying to open a Recordset based on a parameterized query. I'm kind of new to parameterized queries, so I'm sure I'm missing something simple. Set qdfs = db.QueryDefs Set qdf =...
2
by: Stig Nielsson | last post by:
I am wondering what is the most efficient way to make a parameterized factory method, and before I start spending time on performance measurements myself, I would like to hear the NG's opinion: ...
11
by: anony | last post by:
Hello, I can't figure out why my parameterized query from an ASP.NET page is dropping "special" characters such as accented quotes & apostrophes, the registered trademark symbol, etc. These...
4
by: =?Utf-8?B?Sm9uIEphY29icw==?= | last post by:
For MS SQL Server... I am used to declaring local variables in my SQL queries... Declare @MyInt int, @MyChar varchar(33) Parameters were idenfitied with a colon... Where ModDate :MyDate But,...
0
by: Fredrik Lundh | last post by:
John Tantalo wrote: Oh, now I get it. Maybe. Wouldn't it be easier to just use subclassing for parametrization: class LineRequestHandler(StreamRequestHandler): ... self.handle_line(line)
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.