[CentralOH] Javaesque to Pythonic
jep200404 at columbus.rr.com
jep200404 at columbus.rr.com
Thu Feb 2 14:08:55 EST 2017
On Thu, 2 Feb 2017 11:51:18 -0500 (EST), R P Herrold <herrold at owlriver.com> wrote:
> Python (3.2 or
> later) port (seemingly mechanically generated similar to what
> IbPy did with its Jaca 2 Python 'translator) ...
That's good opportunity to repeat a goodie from the scribbles.
Raymond Hettinger has a good presentation about
making some Python code
that has a Javaesque style
(perhaps also mechanically generated)
to be Pythonic.
On Tue, 29 Nov 2016 16:50:35 -0500, jep200404 at columbus.rr.com wrote:
> wp:P versus NP problem
> "P versus NP problem" really means "Pythonic versus non-Pythonic code problem"
> Beyond PEP 8 -- Best practices for beautiful intelligible code
> http://pyvideo.org/pycon-us-2015/beyond-pep-8-best-practices-for-beautiful-inte.html
> There is a good section where he converts a Javaesque API to be Pythonic.
> Sweet! 20:00-40:20
> context manager (__enter__, __exit__) to handle start up and tear down
> sequence class (__len__, __getitem__) to allow normal iteration
> @property syntactic sugah to convert attributes to function calls
>
> but where are the files?
> p_vs_np_2.py?
> p_vs_np_4.py?
> misc1.py?
That presentation is one of the things that led me to
realize how Python is a high level language.
More information about the CentralOH
mailing list