Skip to content

Instantly share code, notes, and snippets.

@Irwin1985
Created June 10, 2022 10:34
Show Gist options
  • Select an option

  • Save Irwin1985/49d203821c0c7dfb01fb87b3e75af9fb to your computer and use it in GitHub Desktop.

Select an option

Save Irwin1985/49d203821c0c7dfb01fb87b3e75af9fb to your computer and use it in GitHub Desktop.

Sentencia Lock

Esto se me ocurre para bloquear funciones o variables tanto en módulos como en ficheros únicos.

lock var name = "John" # in this case name is locked and only can be used in it's own scope.

lock fn change_name(new_name):
    name = new_name # allowed

   
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment