aspose file tools*
The moose likes Jython/Python and the fly likes Book question: Making code pythonic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Languages » Jython/Python
Bookmark "Book question: Making code pythonic" Watch "Book question: Making code pythonic" New topic
Author

Book question: Making code pythonic

Luke Murphy
Ranch Hand

Joined: May 12, 2010
Posts: 300
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?

Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31052
    
162

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?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31052
    
162

Chris,
Like Jython perhaps?

The question is good though. Does the book contain python idioms. I'd hope so!
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1871
    
  16

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.


No more Blub for me, thank you, Vicar.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Book question: Making code pythonic