Making class attributes non-case-sensitive?

Matimus mccredie at gmail.com
Tue Oct 14 23:03:57 CEST 2008


> So is iterating through dir() to force both the members of dir(), and
> the requested attribute name, to lower case for a comparison, really
> the easiest way?
>
> Thanks again for sticking with me. I hope I didn't add to the
> confusion. What I learn I will of course pass on.
>
> - Rafe

It still isn't clear to me _why_ you are wrapping this COM object. You
aren't adding any functionality. If you are using win32com and the TLB
object you are using has a tlb, then you can generate wrapper classes
for them automatically using makepy. You can extend those. If you want
to do it by hand you should be able to just create a class and inherit
win32com.client.DispatchBaseClass (and object if you want to make it
new-style). Unless your users are screaming for this feature, or there
is some technical reason that it is required, then implementing it is
a waste of time. Anybody who is used to developing at all is going to
accept that the software is case sensitive.

Matt



More information about the Python-list mailing list