May-11-2020, 08:13 PM
an editing error exposed this to me which i did not find in the reference manual. on a with statement i omitted the "with_item", that is, the as followed by the variable name. but it still worked. i was using the variable f. so, i left it out, and removed it in another with statement. the script still works. maybe, some day, it will break.
is this supposed to happen? is this a Cpython glitch?
is this supposed to happen? is this a Cpython glitch?
#!/usr/bin/env python3 import os,sys a='~/.'+(sys.argv[0].rsplit('/',1)[1]) try: with open(os.path.expanduser(a+'-pre.py')): p=[x[:-1] for x in f] except: p=""" import os from subprocess import call,DEVNULL,PIPE,Popen,run from sys import stderr,stdin,stdout,version_info from time import sleep,time as secs """.splitlines() try: with open(os.path.expanduser(a+'-suf.py')): s=[x[:-1] for x in f] except: s=[] c='\n'.join(p+sys.argv[1:]+s) if len(sys.argv)>1:os.execvp('/usr/bin/env',['env','python3','-c',c])
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.