how to replace and string in a "SELECT ... IN ()"

Tino Wildenhain tino at wildenhain.de
Sun Sep 28 07:00:02 EDT 2008


Michael Mabin wrote:
> I'm exhausted, so I'll just shut up about this after a few final words.

Thank you for your time :-)
> 1.  "edits" is used in data warehousing to describe data scrubbing or 
> filtering of fields in records that are used as input sources for 
> loading into data warehouses. It's a term that goes way back to batch 
> processing on the mainframe, so it's been used this way for a long time. 
> Sometimes we use 'validation' interchangeably with 'edit' but our use of 
> validation usually involves a check of input data against business rules 
> and not type or range checking which we consider 'edits'.  So maybe 
> you're not used to hearing the term used this way, but it is a variation 
> perhaps of what you're used to.

And so on and so on in the regular top posting manner...

Just to give you some thoughts again: your solution might be valid for
you in your controlled environment. Yet you just presented it to the
OP without telling him the limits of when this can be used. And this
is outright dangerous. If one sees this without comment and without your
background she will run into problems sooner or later. So my suggestion
was to either don't tell people such solutions at all or tell them
exactly under which circumstances they might be used.

Still I think nailing the problem at the apropriate place is a habit
which should generally devloped - as in your example an additional
int() would have fixed it - but still it would not work if you
want to deal with arbitrary strings. So its good to make suggestions
but pretty please think ahead how someone would use it instead of
investing all your energy into defending dangerous programming practice.

With "we in python" I referred to a fairly amount of literature about
programming in python and it design patterns. Nothing me personally.

Ah and some final words to the controlleness of datawarehouse
applications and similar things: by the time you are designing such
a solutuion you will never know what future applications will be
developed around it so its always best to be prepared.

"Data scrubbing" seems a common idea but in fact its very hard to do
it right due to the nature of different systems using different
quoting logic. "Dont trust your input" is a habit not only applicable
to web programming - in fact the company I work for does not do much
web application but input validation is something we get even audited
for.

Nevertheless I wish you a very good weekend :-)

Tino

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3241 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20080928/46524194/attachment.bin>


More information about the Python-list mailing list