On Fri, Apr 24, 2015 at 09:32:51AM -0400, Barry Warsaw wrote: > On Apr 24, 2015, at 11:17 PM, Steven D'Aprano wrote: > > >It seems to me that tools that search for r"^\s*def\s+spam\s*\(" are > > They would likely search for something like r"^\s*def\s+[a-zA-Z0-9_]+" which > will hit "def async spam" but not "async def". Unless somebody wants to do a survey of editors and IDEs and other tools, arguments about what regex they may or may not use to search for function definitions is an exercise in futility. They may use regexes anchored to the start of the line. They may not. They may deal with "def async" better than "async def", or the other way around. Either way, it's a pretty thin argument for breaking the invariant that the token following `def` is the name of the function. Whatever new syntax is added, something is going to break. -- Steve
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4