[Grok-dev] Re: what grok.JSON methods to publish?

Jan-Wijbrand Kolman janwijbrand at gmail.com
Fri Jan 4 13:21:50 EST 2008


Brandon Craig Rhodes wrote:
> Martijn Faassen <faassen at startifact.com> writes:
> 
>> I think indeed the default behavior should be disallow at least
>> double underscores. Forbidding single underscores I'd also be fine
>> with.
> 
> +1
> 
> I would strongly dislike having to put double-underscores in front of
> my own methods and instance variables, thus making them look like
> builtin behaviors, just to get them hidden.  A single underscore
> should be sufficient, so that I can tell "things I'm hiding myself"
> from "things I'm doing so that Python will special-case them."

Since I'd like (need!) to have the __call__ bug fixed asap, I'll look
into having the __* and the _* methods ignored in REST, XMLRPC and JSON
"views".

I'll factor this filtering of methods into one function that the
subsequent grokkers can use. I'll also take care of filtering out the
method for these "view" types that really should be kept internal (like
browserDefault() and publishTraverse()).

kind regards,
jw



More information about the Grok-dev mailing list