Roundtrip SQL data especially datetime
dyork
reverseyorkage at david.com
Sun Dec 17 09:33:56 EST 2006
"Fredrik Lundh" <fredrik at pythonware.com> wrote in message
news:mailman.1710.1166356831.32031.python-list at python.org...
> if you think that Python isn't typed, you've completely missed how things
> work. your problem is that you're removing every trace of the type
> information by casting everything to strings, not that Python itself (nor
> the database adapters) cannot handle typed data.
Fortunately, I'm not offended. I know perfectly well that Python variables
are NOT typed, that Python relies on a dynamically typed model and most
other languages support static typing.I assume you know that too.
The advantage of static typing in this context is that the variable still
holds the type even if the value happens to be null. Any value that has been
exposed to user input comes back as a string and has to be validated and
converted to the correct data type. Static typing provides a convenient
place to generically find out what that type is, to drive a
validator/convertor. There are many ways to do the equivalent in Python, and
I'm interested in any suggestions that save me some work.
DY
More information about the Python-list
mailing list