osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"use strict"


On 11/03/2019 17:45, Abdur-Rahmaan Janhangeer wrote:
> Greetings,
> 
> would it be a good idea to add a use strict in py like js?
> 
> recently i was helping someone and that was one annoying part where a typo
> in a var name caused an unintended variable to slip in.
> 
> maybe something like that
> 
> # -*- strict -*-
> 
> 
> # -*- explicit -*-
> 
> could be used to prevent it

What exactly would you want "strict" (in whatever form) to do?  I'm 
guessing, but it sounds like you want more static checking.  Usually 
that's the province of linters and type annotation, depending on just 
what you want.

-- 
Rhodri James *-* Kynesim Ltd