8000 P3K developer docs · seckcoder/scikit-learn@eb56a35 · GitHub
[go: up one dir, main page]

Skip to content

Commit eb56a35

Browse files
committed
P3K developer docs
1 parent d1caa9b commit eb56a35

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

doc/developers/index.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,24 @@ Here's a simple example of code using some of the above guidelines::
423423
return X[i]
424424

425425

426+
Python 3.x support
427+
------------------
428+
429+
All scikit-learn code should work unchanged in both Python 2.[67]
430+
and 3.2 or newer. Since Python 3.x is not backwards compatible,
431+
that may require changes to code and it certainly requires testing
432+
on both 2.6 or 2.7, and 3.2 or newer.
433+
434+
For most numerical algorithms, Python 3.x support is easy:
435+
just remember that ``print`` is a function and
436+
integer division is written ``//``.
437+
String handling has been overhauled, though, as have parts of
438+
the Python standard library.
439+
The `six <http://pythonhosted.org/six/>`_ package helps with
440+
cross-compability and is included in scikit-learn as
441+
``sklearn.externals.six``.
442+
443+
426444
APIs of scikit-learn objects
427445
============================
428446

doc/developers/utilities.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ Testing Functions
253253
- :func:`testing.assert_raise_message`: Assertions for checking the
254254
error raise message.
255255

256-
- :class:`mock_urllib2`: Object which mocks the urllib2 module to fake
257-
requests of mldata. Used in tests of :mod:`sklearn.datasets`.
256+
- :class:`UrlopenMock`: Object which mocks the urlopen function to fake
257+
requests to mldata.org. Used in tests of :mod:`sklearn.datasets`.
258258

259259
- :func:`testing.all_estimators` : returns a list of all estimators in
260260
sklearn to test for consistent behavior and interfaces.

0 commit comments

Comments
 (0)
0