> | try: > | bytes > | except NameError: > | bytes = str > | > | somewhere, then write the code as I proposed above. > > This is exactly the sort of thing that should be and I expect will be in > the conversion docs.
That expectation might be unfounded (in the sense that it might not be written at all). I only happened to learn about that approach as I was converting Django to 3k. I'll happily put my experience in doing so into an email message, but I won't sit down and write a text document. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com