---
title: "Comment by Siddartha on \"JSON Schema Validator\" | Hashnode"
description: "Why to use global keywork in definition? As assignment considers variable as local to scope, we need to use global keywork to specify explicitly to use the exte"
url: "https://hashnode.com/posts/json-schema-validator/615867bb70a8165c11f63d0f/comment/6158989e70a8165c11f64113"
---

[Discussion](https://hashnode.com/posts/json-schema-validator/615867bb70a8165c11f63d0f)

Comment [JSON Schema Validator](https://hashnode.com/posts/json-schema-validator/615867bb70a8165c11f63d0f)

[Siddartha](https://hashnode.com/@cloudqa)

[Oct 2, 2021](https://hashnode.com/posts/json-schema-validator/615867bb70a8165c11f63d0f/comment/6158989e70a8165c11f64113)

Why to use global keywork in definition? As assignment considers variable as local to scope, we need to use global keywork to specify explicitly to use the external variable.

[docs.python.org/3/faq/programming.html](https://docs.python.org/3/faq/programming.html#why-am-i-getting-an-unboundlocalerror-when-the-variable-has-a-value)
