SAMP MType parameters issue
Thomas Boch
boch at newb6.u-strasbg.fr
Fri Nov 7 01:08:24 PST 2008
Hi Mike,
> Forgive my Python ignorance, but could somebody post a snippet of
> sample code demonstrating the problem? The mtype is a string in a
> bit of XML, how/why is this conflicting with the syntax for a variable
> name?
The mtype arguments are strings in a XML document, and the current
syntax does not prevent to use SAMP from Python.
But Luigi would like to directly map the values of those arguments into
a Python structure (and vice versa), in order to do things like :
cli.notify("table.load.votable", url="file:///path/of/a/votable",
table-id="1234abcd")
This does not work as the hyphen character in table-id is not allowed in
Python variables names.
> If adopted, the BNF has to be a requirement in order to counter the
> freedom we give to create user-defined mtypes (where guys like
> me would naturally use an hyphen if needed). Another alternative is
> to simply use camelCase mtypes.
CamelCase syntax is allowed with the BNF Luigi was suggesting.
Cheers,
Thomas
More information about the apps-samp
mailing list