[Grok-dev] branches review before 0.11 release
Lennart Regebro
regebro at gmail.com
Tue Nov 6 02:50:11 EST 2007
On 11/6/07, Brandon Craig Rhodes <brandon at rhodesmill.org> wrote:
> > 3. There ... still a PageTemplateFile for BBB purposes. Should we
> > keep it so, or deprecate it?
>
> If it's not needed, I would destroy it.
Well, we should at least keep it for 0.11, but with a deprecation.
> My three last thoughts before a merge tomorrow (or, wow, today!):
>
> - Can we rename "fromTemplate" to "fromString"? The name
> "fromTemplate" is misleading since a template is what both
> "fromTemplate" and "fromFile" *return*, not what they *accept* as
> arguments.
Well, it's a question of what is meant with "template". :-)
I didn't use fromString because it takes both string and unicode, but
that now seems like a stupid reason, I don't know what I was thinking.
I'll rename it.
> They accept a string and a file; they each return a
> template. (Ack! I now see there is also a getTemplate() method,
> that is *not* the opposite of fromTemplate()!
Good point.
> - Can we rename "fromFile" to "fromPath" or something? The name
> "fromFile" in Python, by convention, should mean an actual file()
> object, not merely the name of a file.
Hmm. I guess.
> def fromTemplate(self, template):
> _template = MyTemplate(template)
In that case I'd rather call the methods something else than
"fromString" and "fromPath", because to me that implies that you get
something from something.
loadPath and loadString?
--
Lennart Regebro: Zope and Plone consulting.
http://www.colliberty.com/
+33 661 58 14 64
More information about the Grok-dev
mailing list