list functions issue with python
-
This is a minimal recreate :
import re
class foo (object):
def init(self):
self.zing = “joemama”
def bar(self):
print “bar”When I list the function of this class it does not work. However if I add a space to the beginning of the class definition … list functions performs as desired. Sadly adding a space before class breaks the code, so there is no harmony here.
Why would this happen … my eol == LF (unix) encoding is utf, and this operates on a windows system with python 2.7.9Kinda mystified here. Esp since the only workaround is this (this works)
#<begin code>
import re
class foo (object):
def init(self):
self.zing = “joemama”
def bar(self):
#<end code>
print “bar”
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login