In some code I found the statement:
p = property
and my question is what is the meaning intention of this statenmment?
(The code I posted is an excerpt from a larger package (http://asymptote.sourceforge.net/), what is the general idea behind the p = propery
?)
Some background, the complete file with this statement:
#!/usr/bin/env python3
import gettext
p = property
class xasyString:
def __init__(self, lang=None):
s = self
if lang is None:
_ = lambda x: x
else:
lng = gettext.translation('base', localedir='GUI/locale', languages=[lang])
lng.install()
_ = lng.gettext
s.rotate = _('Rotate')
s.scale = _('Scale')
s.translate = _('Translate')
s.fileOpenFailed = _('File Opening Failed.')
s.fileOpenFailedText = _('File could not be opened.')
s.asyfyComplete = _('Ready.')
The only further reference I could find regarding p
is:
class asyLabel(asyObj):
"""A python wrapper for an asy label"""
...
def updateCode(self, asy2psmap=identity()):
"""Generate the code describing the label"""
newLoc = asy2psmap.inverted() * self.location
locStr = xu.tuple2StrWOspaces(newLoc)
self.asyCode = 'Label("{0}",{1},p={2}{4},align={3})'.format(self.text, locStr, self.pen.getCode(), self.align,
self.getFontSizeText())