In Javascript it would be:
var newObject = { \'propertyName\' : \'propertyValue\' }; newObject.propertyName; // retur
I don't know if there's a built-in way to do it, but you can always define a class like this:
class InlineClass(object): def __init__(self, dict): self.__dict__ = dict obj = InlineClass({'propertyName' : 'propertyValue'})