Re: unintentional print?

Guenter Milde via Docutils-users <[email protected]>
Newsgroups gmane.text.docutils.user
Message-ID <[email protected]>
Dear Alan,

thank you for reporting. This is fixed now in the SVN repo.

On 2018-01-03, Alan Isaac wrote:
> I'm guessing that 2to3 conversion is used to support Python 3,

Yes, this is still required. (For fast install, we provide pre-converted
"wheels" on pypi.)

> but somehow I recently managed to choke on:

> File "docutils\utils\math\tex2mathml_extern.py", line 130
>      print err

> Although this could be "fixed" with parentheses, but
> I'm guessing the very existence of this line is an oversight.

> Cheers,
> Alan Isaac

> PS While looking, I noticed old style exception syntax in use.
> I assume this is intentional (i.e., let the converter handle it)
> and that you know Python 2's

>      except IOError, err:

> could be written without any need for 2to3 conversion as

>      except IOError:
>          err = sys.exc_info()[1]

Actually, since we dropped support for Python < 2.6 we can now also use the
simpler

   except IOError as err:
   
and other python-3-save constructs.

Günter   


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Docutils-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.