Mercurial > vim
view src/testdir/test_channel_write.py @ 27146:648a5f658990 v8.2.4102
patch 8.2.4102: Vim9: import cannot be used after method
Commit: https://github.com/vim/vim/commit/857c8bb1bbe754cf2c5b709703d2eb848c800285
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 15 21:08:19 2022 +0000
patch 8.2.4102: Vim9: import cannot be used after method
Problem: Vim9: import cannot be used after method.
Solution: Recognize an imported function name. (closes https://github.com/vim/vim/issues/9496)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 15 Jan 2022 22:15:03 +0100 |
parents | 5cd9ba96561d |
children |
line wrap: on
line source
#!/usr/bin/python # # Program that writes a number to stdout repeatedly # # This requires Python 2.6 or later. from __future__ import print_function import sys import time if __name__ == "__main__": done = 0 while done < 10: done = done + 1 print(done) sys.stdout.flush() time.sleep(0.05) # sleep 50 msec