Question: I want to change guest VM's(Windows) IP address on ESXi. One way I have known is using RDP to connect to the guest OS and modifying the network configuration.

However, I wish to make the process automated. Hence, does vCenter or ESXi contain similar functions or tools to perform this demand? (I have tried ovftool and vCLI but not work)

Thanks for ur reply.

Rocas

Answer: 
> 
> Why is n the exact same Object as None? 
> 
> 
> 

Many immutable objects in Python are [interned](http://en.wikipedia.org/wiki/String_interning) including `None`, smaller ints, and many strings.

Demo:

```
>>> s1='abc'
>>> s2='def'
>>> s3='abc'
>>> id(s1)
4540177408
>>> id(s3)
4540177408    # Note: same as s1
>>> x=1
>>> y=2
>>> z=1
>>> id(x)
4538711696
>>> id(z)
4538711696    # Note: same as x

```

> 
> Why was the language designed
>  such that n is the exact same Object as None? 
> 
> 
> 

See above -- speed, efficiency, lack of ambiguity and memory usage among other reasons to intern immutable objects.

> 
> How would one even
>  implement this behavior in python?
> 
> 
> 

Among other ways, you can override `__new__` to return the same object:

```
class Singleton(object):
    _instance = None
    def __new__(cls, *args, **kwargs):
        if not cls._instance:
            cls._instance = super(Singleton, cls).__new__(
                                cls, *args, **kwargs)
        return cls._instance

```

For strings, you can call [intern](http://docs.python.org/2/library/functions.html#intern) on Python 2 or [sys.intern](http://docs.python.org/3.3/library/sys.html#sys.intern) on Python 3
1. The NoneType overrides `__new__` which always return the same singleton. The code is actually [written in C](http://hg.python.org/cpython/file/b35b204e5d0b/Objects/object.c#l1412) so `dis` cannot help, but conceptually it's just like this.
2. Having only one None instance is easier to deal with. They are all equal anyway.
3. By overriding `__new__`... e.g.

```
class MyNoneType(object):
    _common_none = 0
    def __new__(cls):
        return cls._common_none

MyNoneType._common_none = object.__new__(MyNoneType)

m1 = MyNoneType()
m2 = MyNoneType()
print(m1 is m2)

```