• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Book question: Making code pythonic

 
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Anthony Briggs & Steve Holden,
In python there are many ways to do things. There can be ways that people coming from another programming language take because they are used to it and then a "pythonic" way - a way that some rich feature of the python language provides to make the same objective achievable in a very elegant way.

Does this book provide many python tips to make your code more pythonic?

 
author & internet detective
Posts: 41125
848
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moved this from the welcome thread

Chris Webster wrote:

Luke Murphy wrote:Hi,
In python there are many ways to do things. There can be ways that people coming from another programming language take because they are used to it and then a "pythonic" way - a way that some rich feature of the python language provides to make the same objective achievable in a very elegant way.

Does this book provide many tips to make your code pythonic?


Making Java code Pythonic - would that be like writing it in Groovy?
 
Jeanne Boyarsky
author & internet detective
Posts: 41125
848
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chris,
Like Jython perhaps?

The question is good though. Does the book contain python idioms. I'd hope so!
 
Bartender
Posts: 2407
36
Scala Python Oracle Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:Chris,
Like Jython perhaps?...


Sure. If you're already coming from a Python background to the JVM then Jython would presumably be a good choice. But if you're already on the JVM with JEE and you want the benefits of some "pythonic" features (dynamic programming, closures etc), without a more radical shift such as Clojure, then Groovy seems like a better choice (to me at least) than Jython. Jython is a secondary JVM implementation of a language whose primary development is elsewhere, while Groovy (like Clojure etc) lives on the JVM in the first place.

But it's "Hello! Python" this week, so let's hope we can all pick up lots of Python goodness for whichever languages we use.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic