Ethan Furman added the comment: Empty strings are empty strings, not None.
An better way for your code example would be: def ...(): if url: .... else: raise URLError(...URL cannot be empty...) ---------- nosy: +ethan.furman resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28072> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com