another things i noted:
- using "value.lower() == value" instead of value.islower()
- ansisql.py:
in _requires_quotes():
this
" bool(len([x for x in str(value)
if x not in self._legal_characters()])) "
should be same as
bool( s.translate( 256*' ', self._legal_characters() ) )
and that table(256) can be a static/global.
i know, speed will not budge...
well, profiling some case (5x (simple A,B,C setup + 50x query)), 6%
goes in visit_select, 3% of time goes in __generic_obj_format(), and
3% in getattr, and everything else gets less.
> just habit ...i dont like one liners with ":", also makes it easy
> to tack on conditionals...feel free to submit a patch for all those
> if theyre really bothering you (i guarantee program speed /mem
> usage will not budge in any measurable way).
>
> On Jan 25, 4:30 pm, [EMAIL PROTECTED] wrote:
> > there are several places of such unused lists being made.
> >
> > i pick a random occurence, in this case InstrumentedAttribute:
> >
> > def _adapt_list(self, data):
> > if self.typecallable is not None:
> > t = self.typecallable()
> > if data is not None:
> > [t.append(x) for x in data]
> > return t
> > else:
> > return data
> >
> > why not just
> > for x in data: t.append(x)
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---