Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

py3k_errors_and_warnings.py 497B

12345678910111213141516171819
  1. """Contains both normal error messages and Python3 porting error messages."""
  2. # pylint: disable=too-few-public-methods
  3. # error: import missing `from __future__ import absolute_import`
  4. import sys
  5. # error: Use raise ErrorClass(args) instead of raise ErrorClass, args.
  6. raise Exception, 1
  7. class Test(object):
  8. """dummy"""
  9. def __init__(self):
  10. # warning: Calling a dict.iter*() method
  11. {1: 2}.iteritems()
  12. return 42
  13. # error: print statement used
  14. print 'not in python3'