The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Matz on Python OO

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Red Handed

Posts: 1158
Nickname: redhanded
Registered: Dec, 2004

Red Handed is a Ruby-focused group blog.
Matz on Python OO Posted: Jan 15, 2005 11:06 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Red Handed.
Original Post: Matz on Python OO
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Red Handed
Latest Posts From RedHanded

Advertisement

On his journal, Matz has illustrated some differences between Ruby classes and Python classes, running some examples through the Python interpreter. He largely dwells on the syntax for retrieving a method list for an integer type. I think he’s awfully proud of Ruby’s elegance in this matter, which is cool with me.

In Python:

 >>> (1).__class__.__dict__.keys()
 ['__int__', '__ror__', '__rtruediv__', ... ]

In Ruby:

 >> 1.methods
 => ["%", "between?", "method", "send", ... ]
This just a few days after he mentioned using the encoding pragma from Python’s PEP 263 in a future release of Ruby.

Read: Matz on Python OO

Topic: Rails go web services with XML-RPC prototype Previous Topic   Next Topic Topic: CashHanded #1: Bayesian Filtering

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use