On 03/10/2010 03:29, Hidura wrote:
2010/10/2, Niklasro<nikla...@gmail.com>:
Hello
Getting a web same page with 2 or more possible "states" eg business
part, private part or all parts, can you recommend a way to represent
the states via HTTP GET? Feasible way could be ?business=business, ?
type=business, ?business=true or others. Should I minimize casting the
variable? Which type should I reason, boolen or string? I now use
seemingly arbitrary ?t=w to represent a state which technically works
leaving a more readable and maintainable solution to wish.

> Be more specific but i recommend you, use a way in what you be very
> explicit eg:part='bussiness' a bool for 3 options it's very diffcult
> to handle.
>
I agree. If there are several "states" then use something like
?part=business, ?part=private, etc. Use a Boolean only where there are
(and will only ever be) 2 possible states.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to