It's nothing to do with Python, really.<p>'assert' really is a debugging tool that forces an exception and/or a core dump on a bug condition.<p>It is standard practice to have assertions in debug builds removed in release builds.<p>Code should not use assertions to detect error cases but only bugs (i.e. conditions which should never be true whatever happens).<p>In the code discussed here they are using 'assert' to check a password, which is simply bad design.<p>It's perfectly fine to use 'assert' in Python for what it is for.