mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01:00
20 lines
385 B
Python
20 lines
385 B
Python
class Spam:
|
|
|
|
def __init__(self):
|
|
self.spam = 'spam, spam, spam'
|
|
|
|
def __str__(self):
|
|
return '%s and %s' % (self.spam, self.eggs) # Uninitialized attribute 'eggs'
|
|
|
|
#Fixed version
|
|
|
|
class Spam:
|
|
|
|
def __init__(self):
|
|
self.spam = 'spam, spam, spam'
|
|
self.eggs = None
|
|
|
|
def __str__(self):
|
|
return '%s and %s' % (self.spam, self.eggs) # OK
|
|
|