It's terrible that the FDA is interfering with free association between these gigantic conglomerates and consumers. It's a sin.
516 karma · joined March 24, 2016
persons = [Person(name) for name in names]
valid_persons = [person for person in persons if person.isValid()]
Take this all with a grain of salt, though -- I haven't spent that much time internalizing classical Pythonicness. [person for person in (Person(name) for name in names) if person.isValid()]
or: filter(lambda p: p.isValid, map(Person, names))
or: persons = []
for name in names:
person = Person(name)
if person.isValid():
persons.append(person)