0

I tried looking around on this but search for each of them returned similar meanings for both of the terms. I was curious if there's still any difference between these two, or they can be used interchangeably?

Edit: As suggested, it might depend on language. I would like to ask this for Python.

Weibeu
  • 86
  • 1
  • 3
  • 2
    It would depend on the language, but in all the languages I've used they're *very* different. For example, the name of a variable is typically an identifier - but it isn't a namespace... – Jon Skeet Jul 19 '21 at 08:07
  • Thanks, I have updated the question and set it specific to Python. Okay so I somehow get what's is an identifier. Though any examples for namespace? – Weibeu Jul 19 '21 at 08:10
  • 2
    The terms don't mean anything like each other. This is like asking whether there is a difference between the terms "breadbox" and "loaf". The namespace is a container for identifiers. – Karl Knechtel Jul 19 '21 at 08:13
  • Does https://stackoverflow.com/questions/3913217/what-are-python-namespaces-all-about help? I found it by putting `python what is a namespace` into a search engine. What happened when you tried that? Or else, what search terms did you try? – Karl Knechtel Jul 19 '21 at 08:15
  • I see @KarlKnechtel I think it makes more sense to me now. – Weibeu Jul 19 '21 at 08:24
  • Actually I tried searching the exact same term and first answer was from geeksforgeeks.org where they said: > A namespace is a system that has a unique name for each and every object in Python. An object might be a variable or a method. Python itself maintains a namespace in the form of a Python dictionary. ... Its Name (which means name, a unique identifier) + Space(which talks something related to scope). It just didn't digest me well haha. Now after you mentioned the 'container' this made sense to me. – Weibeu Jul 19 '21 at 08:24

0 Answers0