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.

string_formatting_py3.py 475B

123456789101112131415161718192021
  1. # pylint: disable=missing-docstring,import-error
  2. def issue_957_good():
  3. meat = ['spam', 'ham']
  4. print('%s%s%s' % ('eggs', *meat))
  5. def issue_957_bad1():
  6. meat = ['spam', 'ham', 'monty python']
  7. print('%s%s%s' % ('eggs', *meat)) # [too-many-format-args]
  8. def issue_957_bad2():
  9. meat = ['spam']
  10. print('%s%s%s' % ('eggs', *meat)) # [too-few-format-args]
  11. def issue_957_uninferable():
  12. from butchery import meat
  13. print('%s%s%s' % ('eggs', *meat))