re.NONE

Xavier Ho contact at xavierho.com
Mon Jun 22 19:47:49 EDT 2009


(arg, MRAB, sorry, wrong address!)

Defining None to 0 is a bad idea. You'll have trouble debugging later on.

Ching-Yun "Xavier" Ho, Technical Artist

Contact Information
Mobile: (+61) 04 3335 4748
Skype ID: SpaXe85
Email: contact at xavierho.com
Website: http://xavierho.com/

On Tue, Jun 23, 2009 at 9:43 AM, MRAB <python at mrabarnett.plus.com> wrote:

> 1x7y2z9 wrote:
>
>> I am currently using python v2.5.2.
>>
>> Not sure if this is defined in a later version, but it would be nice
>> to define re.NONE = 0 in the re module.  This would be useful in cases
>> such as:
>> flags = re.DOTALL if dotall else re.NONE
>>
>> Also useful for "building up" flags by ORing with other flags.
>>
>> Thanks.
>>
>
> Just use 0.
>
> If you want it added then try requesting it at:
>
> http://bugs.python.org/
>
> although it might be best to first gauge how much support you have for
> the suggestion.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090623/6fc56b4c/attachment-0001.html>


More information about the Python-list mailing list