2006/5/24, Sanghyeon Seo <[EMAIL PROTECTED]>:
>
> "For instance, if a class defines a method named __getitem__(), and x
> is an instance of this class, then x[i] is equivalent to
> x.__getitem__(i)."
>
> In this case, although x.__getitem__ exists, x is an instance of a
> class which *does not* def
When you file the doc bug, make sure that your "in this case" paragraph
mentions __nonzero__ rather than __getitem__ (assuming you use the same example
that started this, of course).
At 06:11 AM 5/24/2006, Sanghyeon Seo wrote
>2006/5/24, Sanghyeon Seo <[EMAIL PROTECTED]>:
>> Obscure. The issue i
You need Mono later than SVN revision 61043 to compile and run
IronPython 1.0 Beta 7.
Actually, that's because I hacked on Mono to just do that, and my
patch got applied in that revision. I didn't expect to hack on Mono
when I first started playing with IronPython... Such is life, I guess.
Seo Sa
Dino:
Your solution worked!!
Many, many thanks for your attention and help.
_
MSN Amor: busca tu ½ naranja http://latam.msn.com/amor/
___
users mailing list
users@lists.ironpython.com
http:
The fix for this is really simple, if you open
Src\IronPython\Runtime\ReflectedMethod.cs and change line 330:
From: } else if(outArgs != 0 && outArgs == i) {
To : } else if(outArgs != 0 && (curArg+outArgs) == i) {
Then this will work.
Sorry for the regression here. We'll add this to our
Ahh, I had posted the release notes there but not the actual release. Thanks
for catching this, it's been corrected.
Do you want to help develop Dynamic languages on CLR?
(http://members.microsoft.com/careers/search/details.aspx?JobID=6D4754DE-11F0-45DF-8B78-DC1B43134038)
-Original Message
This is definitely our bug - I've opened a bug in our database to track the
issue. Let me look into what the issue is more closely, maybe I can send out a
small change that will fix this for you.
Do you want to help develop Dynamic languages on CLR?
(http://members.microsoft.com/careers/searc
I've opened a bug for us to reconsider what we're doing here. I'm not sure
what the final solution will be but we'll make sure to follow up on the mailing
list with what we end up with. Thanks for suggestion (and the interesting
discussion!)
Do you want to help develop Dynamic languages on CL
Thanks for the bug report - we're actually aware of this issue. I made some
small fixes while fixing other bugs that corrected this in some spots, but not
all... I've gone ahead and opened a bug to track it (we didn't have one
before) so we'll get it entirely cleaned up for the next release.
Neville Bagnall wrote:
> FWIW in the general case I would have something equivalent to:
>
> def GenRepr(object):
> strrep=object.ToString()
> if len(strrep)<40 and strrep.find('\n')==-1:
> return "<%s: %s>" % (object.__class__.__name__, repr(strrep)[1:-1])
> else:
>
Dino:
>>>print pASI.Z_Fm_Asig_Get.__doc__
(Void, int) Z_Fm_Asig_Get(str Z_Abgjr, str Z_Fictr, str Z_Kokrs, str
Z_Kostl, ZASIGTABTable Salida)
Checking witl MSIL I Have:
.method public hidebysig newslot virtual
instance void Z_Fm_Asig_Get(string Z_Abgjr,
>> Generally we try to meet in the middle on __repr__ - in many cases,
>> it's most convenient if the output from __repr__ can be fed back into a
>> factory or constructor for the class the text came from, so that the
>> following expression is legal:
>> new_object = Microsoft.DirectX.Vecto
2006/5/24, Sanghyeon Seo <[EMAIL PROTECTED]>:
> Obscure. The issue is that special method lookup should only happen on
> the type, not the instance. I am not sure whether this is clearly
> specified...
Python Reference Manual 3.3. The wording is not the best. Should file a doc bug.
"For instance,
Obscure. The issue is that special method lookup should only happen on
the type, not the instance. I am not sure whether this is clearly
specified...
# test.py
class Strange(object):
pass
obj = Strange()
obj.__nonzero__ = lambda: False
print obj.__nonzero__()
print bool(obj)
# CPython
False
14 matches
Mail list logo