2009/10/9 Marco Beri <marcob...@gmail.com>: > Ricordo che l'orrido operatore ternario, per essere precisi, era questo: > >>>> (a and [b] or [c])[0] > > Altrimenti se b era per esempio 0 o None, ti tornava c anche in presenza di > un valore True di a.
Faccio finta di non avere del codice fatto cosi`: ("a", "b")[c=='d'] :P -- Lawrence Oluyede [eng] http://oluyede.org - http://twitter.com/lawrenceoluyede [ita] http://neropercaso.it - http://twitter.com/rhymes [flickr] http://www.flickr.com/photos/rhymes _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python