We received a pull request https://github.com/divio/django-cms/pull/5390, for a 
documentation example.

The code sample uses a Python-2-style __unicode__() method; in Python 3 it 
would be __str__().

It’s quite right that this needs to be updated, but we’d like to do it in a 
more systematic way.

The way we change examples itself needs to be consistent. 


Firstly, all new and existing documentation code examples should follow the 
best-practice way to write Django code, which is:

* make it compatible with Python 3 by default
* use the provided shims and utilities so that the same code will *also* work 
with Python 2
* in the rare cases where different code is required to support both, both 
should be provided

This is all described, with examples, in 
https://docs.djangoproject.com/en/1.9/topics/python3.


Secondly, it’s not enough just to change existing examples on a case-by-case 
basis as people happen to find them - we’re going to have to comb through the 
documentation for examples, update, and test them, and then land them as far as 
possible en masse.

Comments? Brave volunteers?

Daniele

-- 
Message URL: 
https://groups.google.com/d/msg/django-cms-developers/topic-id/message-id
Unsubscribe: send a message to 
[email protected]
--- 
You received this message because you are subscribed to the Google Groups 
"django CMS developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/django-cms-developers/0CB37E13-A35F-44B4-82EB-A02C102D4241%40divio.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to