On Fri, Oct 25, 2019 at 9:54 AM Marek Mosiewicz
<marek.mosiewicz at jotel.com.pl> wrote:
> What about, if Python would have optional end keyword. In fact most of
> blocks have starting : sign. What if you would have also keyword to
> optionaly mark end of block.
> That would be big win for IDEs to format code and ensure that there is
> no problems with intendation. There could be some keyword to mark
> script as strictly marking blocks and then it would have this kind of
Python already actually HAS support for an optional end keyword. It
does make your code uglier when you use it, though.
for factor in (2, 3, 4, 8):
audio.frame_data = (data * factor).tobytes()
sphinxamp = r.recognize_sphinx(audio)
except (sr.UnknownValueError, sr.RequestError):
if sphinxamp != sphinx:
print("Sphinx*%d:" % factor, sphinxamp, file=log, flush=True)
Fully supported by all current versions of Python.