Status of RFC 31
Sean Gillies
sgillies at FRII.COM
Thu Aug 9 13:30:39 EDT 2007
Christopher Schmidt wrote:
> On Wed, Aug 08, 2007 at 04:30:23PM -0500, Steve Lime wrote:
>>> What do you mean by how to deal?
>> I mean to we want to expose that function name "as is", so you'd do:
>>
>> $map = mapscript::msLoadMapFromString($string);
>
> By Sean's example, and by correspondance with other similar Python
> library functionality (PIL's similar method, for example), it sounds
> like 'foo = mapscript.fromstring()' would be most in line with user
> expectations in python. There is an additional benefit here that when
> support is added for loading non-map obects from a string automatically
> (so you can do layer = mapscript.fromstring()) the function name still
> makes sense.
>
> Different languages might have other conventions.
>
> I think that it's clear that in most scripting langauges,
> 'msLoadMapFromString' might be overly verbose, though I'm not actually
> sure how PHP translates that -- certainly, in Python, the
> mapscript.msLoad... is repetitive.
>
> Regards,
I've got a mapscript.fromstring for Python only implemented in the
python/pyextend.i file plus tests. I'll commit it as soon as I add a few
tests of Steve's new update method.
Sean
More information about the mapserver-dev
mailing list