News for hackers. Stuff that matters.
Re:Java 9 features announced by TylerE on Monday August 18, 2014 @03:28PM (#8194144)
In python the default is that things that look like attributes/properties REALLY are direct access. If you later need to shim them out into a function you use the @property decorator (and foo.setter if you need read/write)

    class Blah(object):
      foo = 2 # A normal property. Direct access

      @property
      def bar(self):
        return self.some_lookup_method()
    
      @bar.setter
      def bar(self, value):
        self.set_the_bar(value)
Re:Java 9 features announced by rch on Monday August 18, 2014 @05:03PM (#8194664)
Thanks for mentioning this. I've found the Python approach works really well in practice.