On Tue, Apr 5, 2011 at 10:38, mcot <[email protected]> wrote: > I was wondering if you could have a function serve as the default > function that gets called when a property is accessed.
On Tue, Apr 5, 2011 at 4:40 PM, Gary Katsevman <[email protected]>wrote: > I don't think that exists. Instead use the defaults operator `||' like so: > Correct. Currently there are no magic "catch-all" mechanisms in the language. Something called "proxies" are planned for the future. And some browsers (most notably Firefox) allow you to create such catch-alls through the __getter__ (I believe?) property, if you want to experiment. - peter -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
