cleaner way to write this?

Paul Rubin http
Wed Oct 25 20:39:45 CEST 2006

John Salerno <johnjsal at> writes:
> I just need some advice for how to structure
> the check of the empty string.

How about

    return db_name or None

since the empty string taken as a boolean is False.

More information about the Python-list mailing list