On Sat, Mar 3, 2018 at 5:12 AM Oleg Broytman <p...@phdru.name> wrote:
> On Sat, Mar 03, 2018 at 02:36:39PM +1300, Greg Ewing < > greg.ew...@canterbury.ac.nz> wrote: > > [(f(y), g(y)) for x in things where y = h(x)] > > > > Possible objections to this: > > > > * Requires a new keyword, which may break existing code. > > > > - Yes, but "where" is an unlikely choice of name, being > > neither a noun, verb or adjective, so it probably wouldn't > > break very *much* code. > > ``where`` is a very popular name in code related to SQL. Take for > example ORMs: > > > https://github.com/sqlobject/sqlobject/search?l=Python&q=where&type=&utf8=%E2%9C%93 > > > https://github.com/zzzeek/sqlalchemy/search?l=Python&q=where&type=&utf8=%E2%9C%93 > Where is also very common in numpy. So if someone did: from numpy import * data = where(condition) They might have issues > > -- > > Greg > > Oleg. > -- > Oleg Broytman http://phdru.name/ p...@phdru.name > Programmers don't die, they just GOSUB without RETURN. > _______________________________________________ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/