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 asking

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

2019-11-19 Thread Luciano Ramalho
are searching for what you need > 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) > { > ..

Re: nonlocal fails ?

2019-11-15 Thread Luciano Ramalho
; "parm" in the called 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
uot;stuff". > > 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 st

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

2019-11-06 Thread Luciano Ramalho
To use MicroPython 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 Flue

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

2019-11-04 Thread Luciano Ramalho
y calling 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 | A

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

2019-11-04 Thread Luciano Ramalho
Returning None 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.p

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
sp > 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 -- Luci

Re: numpy array - convert hex to int

2019-09-08 Thread Luciano Ramalho
il.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: Is there an archive of this list with permanent URLs to each message?

2019-06-18 Thread Luciano Ramalho
. Besides 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 | Twi

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 --

Coercing two numbers without coerce()

2014-12-10 Thread Luciano Ramalho
e(A+B)(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.pytho

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