On Mon, Sep 17, 2012 at 11:11 PM, wrote:
> Hello, Jeff Hardy ).
> 1)
> It is a good reference. But the methods must be defined in advance (class
> A). If I write ttt ('i') without defining it in the class A, I get an
> error. Use __getattr__ in class A does not work.
>
> class A(object):
> de
Hello, Jeff Hardy ).
The fact that the environment in which the plan is written mixed code.
Operators Python runtime interpreter Python, operators are redirected to a
different language version to another interpreter. It is necessary that
when code appears key word in another language, Python captu
Hi ironpython,
Here's your Daily Digest of new issues for project "IronPython".
In today's digest:ISSUES
1. [New issue] sys.stdout.isatty() always returns True
--
ISSUES
1. [New issue] sys.stdout.isatty() always returns True
http://ironpython.codepl
Well you can subclass the module type and implement __getattr__, you just need
to then publish the module in sys.modules yourself (or provide it via some
import loader hook).
>>> class C(type(sys)):
... def __getattr__(self, name):
... return 42
...
>>> import sys
>>> sys.modules['f
Hello, Dino Viehland ).
Thank you for your participation. In your example foo is required.
It works:
class met(type):
def __getattr__(cls, t):
def __call__(cls, *args, **kw):
class cl(object):
__metaclass__=met
cl(6,y=7).tt(3,yy=4) (and so on)
but cl requir
# didn’t test any of this in IronPython
# this may work and/or help you further
# read on about eval, exec and execfile builtins at
# http://docs.python.org/library/functions.html?highlight=execfile#execfile
class GenericFunction(object):
__slots__ = ('__name',)
def __init__(self, name):
Hello, Niels Poppe.
Thank you. This is a good option. Once again, thank you.
> # didn’t test any of this in IronPython
> # this may work and/or help you further
> # read on about eval, exec and execfile builtins at
> #
> http://docs.python.org/library/functions.html?highlight=execfile#execfi