gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Placeholders templates, and %s


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Placeholders templates, and %s
Date: Wed, 28 Aug 2013 12:31:55 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Aug 27, 2013 at 10:44:34PM +0000, Jim Busser wrote:

> 1. How best to disambiguate these meanings of template:
> 
>       'a file containing placeholders from which to make a document'
>
> and
> 
>       'a formatted string defining an instance of placeholder content'
> 
> --> would these be suitably referred to as
> 
>       'form or document template'
> 
>       vs
> 
>       'string template' or 'line template' (is either wrong, or preferred)?

Both seem fine to me despite it not always being a line and
a string being a programming artefact. How about
"placeholder output template" ?

> 2. where it is written
> 
>       something %s something
> 
> (a) is the 'something' intended to represent any fixed text that the user may 
> like to include?

Yes.

> (b) I gather that %s is a special pythonic token, used to convert a specified 
> value to a string using the Str() function.

Yes.

> Accordingly, I follow when named columns have been specified such as, with 
> placeholder PHX, values like 
> 
>       %(laterality)s
>       %(is_active)s
> 
> but how does %s work in instances where it is used by itself, as in
> 
>       $<soap::soapu //%s::9999>$
> 
> … does it result in serial substitution across all columns,

Yes. Or, rather, whatever str(the_class_in_question) returns.

> or only one (or as many) as have been made into an erstwhile 'column(s) 
> default' somewhere else in the code?

No.

Karsten
-- 
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



reply via email to

[Prev in Thread] Current Thread [Next in Thread]