Normal strings are not guaranteed to be interned. Sometimes it is, sometimes it is not. The rules are complex, version dependent, and are not intentionally documented.
You may depend on Python trying to put small and commonly used objects whenever it's a good idea. And this, if you write some code that depends either on a1 is a2or vice versa, it will break whenever it is inconvenient.
, , . CPython stringobject.c 2.6 2.7, unicodeobject.c 3.3.
, , 2.x( - unicode, str, 3.x). 2.7 , unicode, intern . , 2.7 unicode, .
, 3.3 , str UTF-8, UTF-16 UTF-32, , , API Unicode - . , a1 is a2, , .
python , . , , .