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.

func_noerror_yield_assign_py25.py 387B

123456789101112131415161718192021
  1. """http://www.logilab.org/ticket/8771"""
  2. from __future__ import print_function
  3. def generator():
  4. """yield as assignment"""
  5. yield 45
  6. xxxx = yield 123
  7. print(xxxx)
  8. def generator_fp1(seq):
  9. """W0631 false positive"""
  10. for val in seq:
  11. pass
  12. for val in seq:
  13. yield val
  14. def generator_fp2():
  15. """E0601 false positive"""
  16. xxxx = 12
  17. yield xxxx