[Tutor] Identifying V3 examples
Jon Paris
jon.f.paris at gmail.com
Wed Jul 22 16:16:22 CEST 2015
Yup - the “xxx_todo_changeme” was the part that I meant.
That might not constitute a “problem” for you but, for someone just starting out, exactly what is needed to correct it was not obvious. I have subsequently resolved the issue.
Jon Paris
jon.f.paris at gmail.com
On Jul 22, 2015, at 9:52 AM, Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:
> On 21/07/2015 21:19, Jon Paris wrote:
>> The one example I specifically remember was this one http://code.activestate.com/recipes/532908-text-to-pdf-converter-rewrite/ - I happened to be looking for a simple pdf utility and this one was well reviewed. I subsequently have been told that the parts that 2to3 had trouble with were bad practice to begin with - but what do I know. Most of the other examples 2to3 converted (once I discovered it existed and how to use it in my setup) or I was able to decipher myself.
>
> I've just run that recipe through 2to3 with no problem, so exactly what do you mean by "parts that 2to3 had trouble with"?
>
> Possibly this?
>
> - except IOError, (strerror, errno):
> - print 'Error: Could not open file to read --->', self._ifile
> + except IOError as xxx_todo_changeme:
> + (strerror, errno) = xxx_todo_changeme.args
> + print('Error: Could not open file to read --->', self._ifile)
>
> --
> My fellow Pythonistas, ask not what our language can do for you, ask
> what you can do for our language.
>
> Mark Lawrence
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list