> > I don't think there's anything written down, but I don't think we > > invented anything either. Python scripts are typically written to be > > importable: > > . > > $ printf '%s\n' 'def foo():' ' return 42' > foo.py > > $ python3 -c 'import foo; print(foo.foo())' > > 42 > > $ > > I see that many of the .py files in the folder cannot be imported either.
Past bugs are no excuse to write new ones :) > Give the file name it has it cannot be imported, this is a mute point. No, it's not. It still matters if the file is renamed (either by us before committing it, or by a user down the road) or if it is imported using the appropriate stdlib functions. > >> +def outputHash(fd, hash): > >> + """\ > >> + Write a dictionary to an FD in the same format as used by > > > > Say the formal parameter's name somewhere in here? > > Why have a back slash at all? Presumably so as to make the docstring easier to read inside the source. > I avoid them in python code because of the problems of \<SP>. Even if there were a trailing space there, that wouldn't break anything. Nobody's going to run a docstring extractor tool on this script (and if they do, they'll discover the whitespace and remove it then). I guess we could just remove the backslash, too. No strong opinion here. > Incidentally, if anyone wants to drop the zsh implementation I posted upthread somewhere, feel free. I'm around to answer questions, review docs, etc.. Cheers, Daniel