Am 28.07.2011 20:01 schrieb Ian Kelly:
The advantage of Thomas's decorator here is that it lets you place the
denotation of whether a function is exported alongside its definition,
whereas simply declaring the __all__ list forces you to separate them.
It also avoids the problem of possibly
Thomas,
A ha! Now I feel all warm and fuzzy inside. It's nice to start the day with
learning something new.
To be honest, the initial problem was that I didn't understand the meaning
of '__all__', again probably from not working in the large with python.
After posting, I went and had another go
On 07/29/2011 08:37 AM, Thomas Rachel wrote:
Am 28.07.2011 20:01 schrieb Ian Kelly:
The advantage of Thomas's decorator here is that it lets you place the
denotation of whether a function is exported alongside its definition,
whereas simply declaring the __all__ list forces you to separate
Thomas Rachel wrote:
class AllList(list):
list which can be called in order to be used as a
__all__-adding
decorator
Wow, this is a great idea.
--
--OKB (not okblacke)
Brendan Barnwell
Do not follow where the path may lead. Go, instead, where there is
no path, and leave
Hello,
__all__ = 'api db input output tcl'.split()
or
__all__ =
api
db
input
output
tcl
.split()
for lazy boy ;o). It is readable as well.
What do you think?
Cheers
Karim
--
Karim karim.liat...@free.fr writes:
Hello,
__all__ = 'api db input output tcl'.split()
or
__all__ =
api
db
input
output
tcl
.split()
Maybe this:
__all__ = [x.__name__ for x in [
Am 28.07.2011 13:32 schrieb Karim:
Hello,
__all__ = 'api db input output tcl'.split()
or
__all__ =
api
db
input
output
tcl
.split()
for lazy boy ;o). It is readable as well.
What do you think?
Why not? But you could even do
class AllList(list):
list which can be called in order to
On 07/28/2011 02:29 PM, Thomas Rachel wrote:
__all__ = AllList()
Hello Thomas,
Very beautiful and elegant code. Having both at the same time an
instance and a method...
With this 'small' topic, you taught me something today on property
application!
Cheers
Karim
--
HI Thomas,
I've not really got the hang of decorators yet, so I was wondering why one
might use your approach rather than just using Karim's original method?
I only really use python for smallish, utility programs, so I suppose I
haven't come across an issue complex enough to see a clear
On Thu, Jul 28, 2011 at 7:22 AM, mark ferguson markf...@gmail.com wrote:
I've not really got the hang of decorators yet, so I was wondering why one
might use your approach rather than just using Karim's original method?
The advantage of Thomas's decorator here is that it lets you place the
Thomas Rachel wrote:
Why not? But you could even do
class AllList(list):
list which can be called in order to be used as a __all__-adding
decorator
def __call__(self, obj):
for decorators
self.append(obj.__name__)
return obj
__all__ = AllList()
@__all__
def
11 matches
Mail list logo