[issue45090] Add pairwise to What's New in Python 3.10; mark it as new in itertools docs

2021-09-02 Thread Luciano Ramalho
New submission from Luciano Ramalho : Thanks for adding `itertools.pairwise()`! Let's make it easier to find by mentioning it in "What's New in Python 3.10" and also marking it as "New in Python 3.10" in the `itertools` module documentation. -- assignee: do

[issue43378] Pattern Matching section in tutorial refers to | as or

2021-03-02 Thread Luciano Ramalho
New submission from Luciano Ramalho : Section 4.6. "match Statements" of the Python 3.10 tutorial says: """ You can combine several literals in a single pattern using | (“or”): """ For someone just learning Python, this may suggest that | is always &quo

[issue43378] Pattern Matching section in tutorial refers to | as

2021-03-02 Thread Luciano Ramalho
Change by Luciano Ramalho : -- nosy: ramalho priority: normal severity: normal status: open title: Pattern Matching section in tutorial refers to | as ___ Python tracker <https://bugs.python.org/issue43

[issue42781] functools.cached_property docs should explain that it is non-overriding

2020-12-29 Thread Luciano Ramalho
Luciano Ramalho added the comment: > FYI, the usual term is "data descriptor" instead of "overriding descriptor". Yes, the Python docs are consistent in always using "data descriptor", but I've adopted "overriding descriptor" from Martelli's Python

[issue42781] functools.cached_property docs should explain that it is non-overriding

2020-12-29 Thread Luciano Ramalho
New submission from Luciano Ramalho : functools.cached_property is a great addition to the standard library, thanks! However, the docs do not say that @cached_property produces a non-overriding descriptor, in contrast with @property. If a user replaces a @property with a @cached_property

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-08-02 Thread Luciano Ramalho
Luciano Ramalho added the comment: The merged PR that fixed https://bugs.python.org/issue40979 also fixes this issue. It is now documented that these protocols are runtime checkable, with caveats. -- ___ Python tracker <https://bugs.python.

[issue40979] typing module docs: keep text, add subsections

2020-08-01 Thread Luciano Ramalho
Luciano Ramalho added the comment: I have incorporated Guido's suggestions and added additional subsections to make it easier to navigate the page. I also added notes that fix the issue https://bugs.python.org/issue40978 — "Document that typing.SupportsXXX protocols are runtime chec

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-08-01 Thread Luciano Ramalho
Luciano Ramalho added the comment: I have added a note about the protocols decorated with `@runtime_checkable` to the `Procools` section of the reorganized `typing.rst` in https://bugs.python.org/issue40979. I also expanded the note about the caveats of `@runtime_checkable` in its entry

[issue40979] typing module docs: keep text, add subsections

2020-07-20 Thread Luciano Ramalho
Luciano Ramalho added the comment: Reviewers, besides adding section titles and reordering the entries, I made only these changes to the text: - entry for IO, TextIO, BinaryIO: added sentence "These types are in the ``typing.io`` namespace." - entry for Pattern, Match: adde

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-19 Thread Luciano Ramalho
I apologize to all but the intended recipient for this. I’d have given him feedback in private if I knew his email. I will take leave from the list now. Keep up the good work, friendly responders. On Tue, 19 Nov 2019 at 17:13 Luciano Ramalho wrote: > Now that’s a novel approach to ask

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-19 Thread Luciano Ramalho
t; to use to solve a particular problem (even one as stupid as just calling > another method) > > > By the way, the whole solution consists outof the following: > > static PyObject *py_proc1(PyObject *self, int ExtraArg, PyObject *args) > { > > Py_RETURN_NONE > } >

Re: nonlocal fails ?

2019-11-15 Thread Luciano Ramalho
ed function to do > > > -- > Wulfraed Dennis Lee Bieber AF6VN > wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.freeddns.org/ > > -- > https://mail.python.org/mailman/listinfo/python-list -- Luciano Ramalho | Author of Fluent Python (O'Reilly, 2015) | http://shop.oreilly.com/product/0636920032519.do | Technical Principal at ThoughtWorks | Twitter: @ramalhoorg -- https://mail.python.org/mailman/listinfo/python-list

Re: How to delay until a next increment of time occurs ?

2019-11-13 Thread Luciano Ramalho
; > Yup. But the cost of using that command is generating threads - which some > search results warned against (not sure why though). > > The best solution I can think of would be a build-in (hardware?) timer which > would generate "ticks" until its stopped. > > Reg

Re: psutil.boot_time() ... doesn't ?

2019-11-06 Thread Luciano Ramalho
croPython on them, you install firmware that boots directly into the MicroPython runtime, which includes a REPL. Cheers, Luciano > > -- > Terry Jan Reedy > > -- > https://mail.python.org/mailman/listinfo/python-list -- Luciano Ramalho | Author of Fluent Python

Re: OOP - how to abort an __init__ when the initialisation code fails ?

2019-11-04 Thread Luciano Ramalho
ng getattr(obj, name) and returning True if no exception is raised, or False if AttributeError is raised. That is common Python style. Cheers, Luciano > > Regards, > Rudy Wieser > > > -- > https://mail.python.org/mailman/listinfo/python-list -- Luciano Ramalho | Author of F

Re: OOP - how to abort an __init__ when the initialisation code fails ?

2019-11-04 Thread Luciano Ramalho
will specifically NOT accomplish the thing > you want; nothing ever checks the return value of __init__. > > -- > Rob Gaddi, Highland Technology -- www.highlandtechnology.com > Email address domain is currently out of order. See above to fix. > -- > https://mail.python.org/mailm

Re: What about idea of making a "Pythonic Lisp"...i.e. a Lisp that more closely resembles the syntax of Python?

2019-09-15 Thread Luciano Ramalho
gt; flavor that was closer to Python. Then, later converting that "Pythonic > Lisp" to Clojure later. That "Pythonic Lisp" is what I was thinking about. > > Cheers, > > Chris > > -- > https://mail.python.org/mailman/listinfo/python-list -- Luciano R

Re: numpy array - convert hex to int

2019-09-08 Thread Luciano Ramalho
org/mailman/listinfo/python-list -- Luciano Ramalho | Author of Fluent Python (O'Reilly, 2015) | http://shop.oreilly.com/product/0636920032519.do | Technical Principal at ThoughtWorks | Twitter: @ramalhoorg -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there an archive of this list with permanent URLs to each message?

2019-06-18 Thread Luciano Ramalho
the asyncio breakage, there are a few better ways of doing things. And I will cover typing. Cheers, Luciano -- Luciano Ramalho | Author of Fluent Python (O'Reilly, 2015) | http://shop.oreilly.com/product/0636920032519.do | Technical Principal at ThoughtWorks | Twitter: @ramalhoo

Is there an archive of this list with permanent URLs to each message?

2019-06-17 Thread Luciano Ramalho
Used to be at this URL: https://mail.python.org/pipermail/python-list/2009-February/538048.html -- Luciano Ramalho | Author of Fluent Python (O'Reilly, 2015) | http://shop.oreilly.com/product/0636920032519.do | Technical Principal at ThoughtWorks | Twitter: @ramalhoorg -- https

Coercing two numbers without coerce()

2014-12-10 Thread Luciano Ramalho
)(A), or A+B-B, but both alternatives are ugly and perform needless arithmetic. What do you suggest, now that the coerce() built-in is not available? Cheers, Luciano -- Luciano Ramalho Twitter: @ramalhoorg Professor em: http://python.pro.br Twitter: @pythonprobr -- https://mail.python.org

[issue13005] operator module docs include repeat

2011-09-18 Thread Luciano Ramalho
New submission from Luciano Ramalho luci...@ramalho.org: The operator module documentation for versions 3.2 and 3.3 includes the repeat function in a table 9.3.1. Mapping Operators to Functions [1], but fails to mention that the repeat function is deprecated and mul should be used instead

[issue1293741] doctest runner cannot handle non-ascii characters

2009-01-11 Thread Luciano Ramalho
Luciano Ramalho luci...@ramalho.org added the comment: I have confirmed everything that akaihola reports in Python 2.4, 2.5 and 2.6, but the problem is not limited to non-matching test output. It also happens with doctests with zero failures when the module is run with the -v command-line switch

Re: zip files as nested modules?

2007-04-06 Thread Luciano Ramalho
Importing modules from zip files was proposed in PEP-273 [1] Here is how the spec of PEP-273 begins: ''' Currently, sys.path is a list of directory names as strings. If this PEP is implemented, an item of sys.path can be a string naming a zip file archive. ''' My interpretation of the above is