|
From: | Piotr Held |
Subject: | [Octave-bug-tracker] [bug #51659] Calling 'methods' on self causes syntax error |
Date: | Fri, 4 Aug 2017 21:23:23 -0400 (EDT) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36 |
Follow-up Comment #2, bug #51659 (project octave): If you want to close the bug, that's fine. I do see your point. If you want the answer to what methods(self) returns, it's what you'd expect: 'foo' and 'm1'. The way someone was using it was to try to randomly call class methods for test cases. So they had a method (within the test class): function testShuffle (self) methodNames = methods (self); for i=1:length(methodNames) eval(['self.' methodNames{i}]); end end Obviously the code does a little more (it actually shuffles) but that's the just of it. Do you have some suggestions of how to get around that? _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?51659> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |