On Sat, Aug 23, 2008 at 2:15 PM, Victor Lin <[EMAIL PROTECTED]> wrote:
>
> Formula pattern is release now.
>
> http://elixir.ematia.de/trac/wiki/Recipes/Formula
Thanks for sharing! I'm skimmed through it and I have a few comments:
Could you translate the Chinese text in the examples to English? It
usually makes for more understandable examples (to those who can't
read Chinese). Besides, some people don't even have chinese fonts
installed, so all they see it some ugly rectangle characters.
I notice you defined several toString methods on your classes. Why
didn't you use Python's builtin __str__ ? so that you can simply
"print <a formula>" ?
Finally, in FormulaElement, you manually define some kind of sequence.
Why is it so? Why don't you let the "id" column be generated
automatically and use the default sequence for it?
FormulaElement(Entity):
using_options(inheritance='multi')
using_options(tablename='formula_element')
id = Field(Integer, primary_key=True, default=getNextId)
...
> By the way, I update a file "test_formula_builder.2.py" that is
> duplicate, but I have no idea how to delete it, could someone delete
> it for me? Thanks.
Done.
--
Gaƫtan de Menten
http://openhex.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---