[issue29414] Change 'the for statement is such an iterator' in Tutorial

2017-02-04 Thread Marco Buttu
Marco Buttu added the comment: Even though the Terry suggestion is formally correct, we are just at the beginning of the tutorial, and unluckily the tuples have not been introduced yet. To avoid adding to much complication here, IMHO we can just left the preceding sentences as they are

[issue29428] Doctest documentation unclear about multi-line fixtures

2017-02-04 Thread Marco Buttu
Marco Buttu added the comment: > In parallel, I was thinking of some howto content that I would like to > see documented. Great :-) > How to decide what to test with doctests and what with unittests. > I have a feeling that the sweet spot of doctests is functionality > which yo

[issue29441] Update examples to use async and await keywords in asyncio-task.rst

2017-02-04 Thread Marco Buttu
Marco Buttu added the comment: The patch is OK to me. I also executed the examples, and everything works fine :-) -- nosy: +marco.buttu ___ Python tracker <http://bugs.python.org/issue29

[issue29455] Mention coverage.py in trace module documentation

2017-02-06 Thread Marco Buttu
Marco Buttu added the comment: I added a "seealso" at the end of the page. -- keywords: +patch nosy: +marco.buttu Added file: http://bugs.python.org/file46538/issue29455.patch ___ Python tracker <http://bugs.python.o

[issue29455] Mention coverage.py in trace module documentation

2017-02-06 Thread Marco Buttu
Marco Buttu added the comment: Thank you Brett, here is another patch. I added the seealso directive right after the introduction of the trace module, in the same way as urllib.request does for requests. -- Added file: http://bugs.python.org/file46548/issue29455_2nd.patch

[issue22594] Add a link to the regex module in re documentation

2017-02-07 Thread Marco Buttu
Marco Buttu added the comment: IMHO the reference proposed in the patch is too verbose. Adding details like what is supported and how to use some features I think is out of the scope of the reference. Moreover, if the regex module changes the features we are reporting in the reference, we&#x

[issue22594] Add a link to the regex module in re documentation

2017-02-07 Thread Marco Buttu
Marco Buttu added the comment: Looking at the regex module and documentation, it is not clear to me whether its API behaves exactly as the re API. In addition, being a third-party module, things can change in the future. To be defensive, IMO it is better to write as in the Ezio comment (in

[issue22594] Add a link to the regex module in re documentation

2017-02-08 Thread Marco Buttu
Marco Buttu added the comment: > With the VERSION0 flag (the default behaviour), it should > behave the same as the re module, and that's not going to change. Thanks for the clarification Matthew. However, the default version will change, as the regex PyPI page points out: "I

[issue29474] Grammatical errors in weakref.WeakValueDictionary docs

2017-02-08 Thread Marco Buttu
Marco Buttu added the comment: The second patch LGTM. In the first one there is a typo (see review). -- nosy: +marco.buttu ___ Python tracker <http://bugs.python.org/issue29

[issue29474] Grammatical errors in weakref.WeakValueDictionary docs

2017-02-08 Thread Marco Buttu
Marco Buttu added the comment: Thanks Mariatta, now it is OK to me -- ___ Python tracker <http://bugs.python.org/issue29474> ___ ___ Python-bugs-list mailin

[issue29506] Incorrect documentation for the copy module

2017-02-09 Thread Marco Buttu
Marco Buttu added the comment: +1 for the Steven's suggestion -- nosy: +marco.buttu ___ Python tracker <http://bugs.python.org/issue29506> ___ ___ Pytho

[issue29506] Incorrect documentation for the copy module

2017-02-09 Thread Marco Buttu
Marco Buttu added the comment: Serhiy is right about "deep copy" instead of "deepcopy", but IMO the Steven's proposal (with the "deep copy" correction) is much clearer than the current doc. -- ___ Python tracker

[issue29387] Tabs vs spaces FAQ out of date

2017-02-10 Thread Marco Buttu
Marco Buttu added the comment: Thanks Jim. I tested thise exec() in Py2.7 and Py3 (3.5 - 3.7): exec("if True:\n" + " "*width + "1\n" + "\t2\n") * width == 0 raises a IndentationError both in Py2 and Py3 * width in range(1, 8) raises an IndentationError

[issue29526] Documenting format() function

2017-02-10 Thread Marco Buttu
Marco Buttu added the comment: > It may be worth to add a reference to FORMATTING from the > format() docstring. +1 :-) -- nosy: +marco.buttu ___ Python tracker <http://bugs.python.org/i

[issue27200] make doctest in CPython has failures

2017-02-22 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +202 ___ Python tracker <http://bugs.python.org/issue27200> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22594] Add a link to the regex module in re documentation

2017-02-22 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +204 ___ Python tracker <http://bugs.python.org/issue22594> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22549] bug in accessing bytes, inconsistent with normal strings and python 2.7

2017-02-22 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +203 ___ Python tracker <http://bugs.python.org/issue22549> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29455] Mention coverage.py in trace module documentation

2017-02-23 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +233 ___ Python tracker <http://bugs.python.org/issue29455> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29414] Change 'the for statement is such an iterator' in Tutorial

2017-02-23 Thread Marco Buttu
Marco Buttu added the comment: Hello Jim, do you have the time to make a pull request? Let me know, otherwise I will do it -- ___ Python tracker <http://bugs.python.org/issue29

[issue16355] inspect.getcomments() does not work in the interactive shell

2017-02-23 Thread Marco Buttu
Marco Buttu added the comment: Hello Vajrasky, the doc patch LGTM. Looking at the David's comment in Rietveld, it seems that he does not want the test patch to be applyed. Can you please make a pull request? Thank you very much -- ___ P

[issue29414] Change 'the for statement is such an iterator' in Tutorial

2017-02-24 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +245 ___ Python tracker <http://bugs.python.org/issue29414> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29648] Missed reference to create_module() in versionadded (import.rst)

2017-02-25 Thread Marco Buttu
New submission from Marco Buttu: In the first `versionadded` of the Loader section [1] of Doc/reference/import.rst, there is no reference to `create_module()`: .. versionadded:: 3.4 The create_module() method of loaders. It should be: .. versionadded:: 3.4 The :meth

[issue29648] Missed reference to create_module() in versionadded (import.rst)

2017-02-25 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +261 ___ Python tracker <http://bugs.python.org/issue29648> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29669] Missing import of bisect in the documentation examples

2017-02-27 Thread Marco Buttu
New submission from Marco Buttu: There is no import of bisect.bisect() and bisect.bisect_left() in the documentation. IMHO the examples are clearer and more complete if we import these functions, as in the attached patch. -- assignee: docs@python components: Documentation files

[issue29414] Change 'the for statement is such an iterator' in Tutorial

2017-02-28 Thread Marco Buttu
Marco Buttu added the comment: Wolfgang, thanks for your contribution. However, I prefere the chapter as it currently is, because IMHO it introduces the concepts more gradually than your proposal. In addition the modification of the title section from "for Statements" to "

[issue29414] Change 'the for statement is such an iterator' in Tutorial

2017-03-01 Thread Marco Buttu
Marco Buttu added the comment: > I don't see this point. The other section titles are not about > loops. The preceding chapter introduces while loops as a loop, > not a statement, and this chapter talks about while and for > loops further down the page. What I mean is that c

[issue27200] make doctest in CPython has failures

2017-03-02 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +332 ___ Python tracker <http://bugs.python.org/issue27200> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17704] ImportError: No module named '_curses'

2013-04-12 Thread Marco Buttu
New submission from Marco Buttu: Right now I downloaded and installed Python 3.3.1 on Linux Mint 14, with Cinnamon: $ uname -a Linux buttu-oac 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux $ python3.3 Python 3.3.1 (default, Apr 12 2013, 16:24:16

[issue26182] Deprecation warnings for the future async and await keywords

2016-01-22 Thread Marco Buttu
New submission from Marco Buttu: I saw that async and await will become keywords in Python 3.7 : https://www.python.org/dev/peps/pep-0492/#deprecation-plans I enabled the deprecation warnings in Python 3.5.1 and Python 3.6 dev, and I noticed that assigning to async or await does not issue any

[issue26182] Deprecation warnings for the future async and await keywords

2016-02-02 Thread Marco Buttu
Marco Buttu added the comment: The check for the 'with' statement was handled in the parser (parsetok.c), and in Python 2.5 the warnings were enabled by default. I do not know how to check if the deprecation warning are enabled, otherwise I would have tried to fix t

[issue26182] Deprecation warnings for the future async and await keywords

2016-02-03 Thread Marco Buttu
Marco Buttu added the comment: Thank you Brett, your explanation (msg259409) and the c-api doc are really straightforward. I think I can fix it in a few days, just the time to read the devguide and be confident about the workflow. -- ___ Python

[issue26182] Deprecation warnings for the future async and await keywords in Python 3.6

2016-02-11 Thread Marco Buttu
Marco Buttu added the comment: I added the PyErr_WarnEx(PyExc_DeprecationWarning, ...) in Python/ast.c, right below the check for None, True and False as names. Running the following test the message is properly printed: def test_async(self): with self.assertWarnsRegex(DeprecationWarning

[issue26182] Deprecation warnings for the future async and await keywords in Python 3.6

2016-02-12 Thread Marco Buttu
Marco Buttu added the comment: Thank you Brett, the problem was the missed exec(). With the patch in attachment the tests pass, but it does not seem to me a good solution. Infact, changing the filter at runtime has no effect: $ cat foo.py import warnings warnings.simplefilter("a

[issue26898] Error in the

2016-05-01 Thread Marco Buttu
New submission from Marco Buttu: The math.isclose() documentation reports is_close() as function name, instead of isclose(): >>> import math >>> math.isclose.__doc__[:45] 'is_close(a, b, *, rel_tol=1e-09, abs_tol=0.0)' -- assignee: docs@python com

[issue26898] Typo in the documentation of math.isclose()

2016-05-01 Thread Marco Buttu
Changes by Marco Buttu : -- title: Error in the -> Typo in the documentation of math.isclose() ___ Python tracker <http://bugs.python.org/issue26898> ___ ___ Py

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2016-05-26 Thread Marco Buttu
Marco Buttu added the comment: The error message is misleading: >>> s = '{names[-1]} loves {0[1]}' >>> s.format(('C', 'Python'), names=('Dennis', 'Guido')) Traceback (most recent call last): ... TypeError: tuple indice

<    1   2