[Baypiggies] Type checking - argument for it being bad practice?
aahz at pythoncraft.com
Sat Oct 9 18:18:40 CEST 2010
On Sat, Oct 09, 2010, Zachary Collins wrote:
> Another reason I like python's hands off approach to private members
> and typing is that... I don't trust other programmers to know what I
> need to do. Frankly, my belief is that the coder who is most
> immediately writing software has priority over the guy who wrote the
> lib 10 years ago. If I need your private variable to hack around a
> feature problem or bug, I don't want to have to ask "pretty please".
> If I need to give you a type you didn't think about when you wrote
> your library, I don't want to have to assure you that it's ok. How
> about I take responsibility for that?
This is something I think about every time I deal with pycurl -- it
requires a real file object, not just a pseudo-file such as StringIO or
NamedTemporaryFile. And I can see why the impedence mismatch between
pycurl and the underlying libcurl discouraged the pycurl programmers from
Doing The Right Thing.
So although I agree with you and although I get regularly annoyed at
pycurl, I am somewhat hesitant to cast stones as people who get it Wrong.
On the gripping hand, I am somewhat likely to discard pycurl if I get
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur." --Red Adair
More information about the Baypiggies