News for hackers. Stuff that matters.
Re:Python for Ruby Programmers (LA RubyConf 2013) by arxanas on Wednesday February 27, 2013 @04:05PM (#5294907)
Interestingly you can do this:

    class Foo:
        def bar(self):
            return "bar"

    foo = Foo()
    foo.bar()      # returns "bar"
    Foo.bar(foo)   # returns "bar"
So it's not actually specifying `self` for instance methods; it's just a special thing about class instances that calling a method will call its class's method passing the instance as the first argument.

After realizing this, I was enlightened.

Re:Python for Ruby Programmers (LA RubyConf 2013) by masklinn on Wednesday February 27, 2013 @04:08PM (#5294925)
> Foo(foo, bar) # returns "bar"

I think you meant `Foo.bar(foo)` here.

Re:Python for Ruby Programmers (LA RubyConf 2013) by arxanas on Wednesday February 27, 2013 @04:17PM (#5294996)
You're right. I'm not thinking.