lizh06 / fabricate

Automatically exported from code.google.com/p/fabricate
0 stars 0 forks source link

[PATCH] Use simpler syntax for global Builder wrappers #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using simple assignments is easier and more maintainable since there is no
need to update the "wrapper" if the original function changes.

Note that the patch attached depends on the patch in Issue 9 to apply cleanly.

Original issue reported on code.google.com by llu...@gmail.com on 31 Jul 2009 at 9:59

Attachments:

GoogleCodeExporter commented 9 years ago
llucax, your way is definitely simpler, but if you use another type of Builder 
in
setup(), like `setup(builder=MyBuilder)` it won't work as expected. So need to 
do it
the slightly more verbose way in case the `default_builder` global changes in 
setup().

Original comment by benh...@gmail.com on 2 Aug 2009 at 10:05

GoogleCodeExporter commented 9 years ago
You are right, nice catch.

Original comment by llu...@gmail.com on 2 Aug 2009 at 10:17