comparison doc/v2_planning/API_coding_style.txt @ 1513:2b3cff882382

Tell to use isinstance(x, basestring).
author Frederic Bastien <nouiz@nouiz.org>
date Tue, 13 Sep 2011 14:02:33 -0400
parents 3d4615ee96a4
children 97ec0d3248ca
comparison
equal deleted inserted replaced
1512:7f166d01bf8e 1513:2b3cff882382
442 .. code-block:: python 442 .. code-block:: python
443 443
444 if __name__ == '__main__': 444 if __name__ == '__main__':
445 sys.exit(main()) 445 sys.exit(main())
446 446
447 * Avoid isinstance(x, str) as this don't work with unicode string, use:
448
449 .. code-block:: python
450
451 isinstance(x, basestring)
447 452
448 The ``logging`` Module vs. the ``warning`` Module 453 The ``logging`` Module vs. the ``warning`` Module
449 ================================================= 454 =================================================
450 455
451 The ``logging`` Module 456 The ``logging`` Module