Yeah, I know it's quite simple to do manually. I was just interested
if it could be done by regular expressions. Thank you anyway.
On 1 нояб, 00:36, Matimus <[EMAIL PROTECTED]> wrote:
> On Oct 31, 11:57 am, netimen <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> >
there may be different levels of nesting:
"a < b < Ó > d > here starts a new group: < 1 < e < f > g > 2 >
another group: < 3 >"
On 31 окт, 21:57, netimen <[EMAIL PROTECTED]> wrote:
> Thank's but if i have several top-level groups
< с > d > here starts a new group: < e < f > g "
On 31 окт, 20:53, Matimus <[EMAIL PROTECTED]> wrote:
> On Oct 31, 10:25 am, netimen <[EMAIL PROTECTED]> wrote:
>
> > I have a text containing brackets (or what is the correct term for
> >
I have a text containing brackets (or what is the correct term for
'>'?). I'd like to match text in the uppermost level of brackets.
So, I have sth like: ' 123 < 1 aaa < t bbb < a ff > > 2 >
b'. How to match text between the uppermost brackets ( 1 aaa < t
bbb < a ff > > 2 )?
P.S. sorry
I couldn't substitute __str__ method of an instance. Though I managed
to substitute ordinary method of an instance:
from types import MethodType
class Foo(object):
pass
class Printer(object):
def __call__(self, obj_self):
return 'printed'
f = Foo()
f.printer = MethodType(Print
On 23 окт, 00:26, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> netimen a écrit :
> (snip)
>
> > OK, I have implemented Bruno Desthuilliers example. But there is
> > another question: can I having a method determine if it is an instance
> > of given class. So:
&
On 23 окт, 00:34, Terry Reedy <[EMAIL PROTECTED]> wrote:
> George Sakkis wrote:
> > On Oct 22, 12:13 pm, netimen <[EMAIL PROTECTED]> wrote:
>
> >> Can I substitute a method of a class by a callable object (not a
> >> function)? I can very easy insert my fu
On 22 окт, 20:46, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> netimen a écrit :
>
> > Can I substitute a method of a class by a callable object (not a
> > function)? I can very easy insert my function in a class as a method,
> > but an object - can't.
>
Can I substitute a method of a class by a callable object (not a
function)? I can very easy insert my function in a class as a method,
but an object - can't.
I have the following:
class Foo(object):
pass
class Obj(object):
def __call__(self, obj_self):
print 'Obj'
def func(self)