Re: Namespaces
On Tue, 24 Oct 2000, David.Cuny at DSS.CA.GOV wrote:
> Irv wrote:
>
> > hr, min, sec = date()[4..6]
>
> The only reason that this isn't part of the Py grammar is because it's not
> part of Euphoria. It's been discussed here before, and I don't recall it
> getting an overwhelming reception.
I recall it being discussed a number of times,
specifically because of the awkward requirement for a "go-between"
variable when using parts of returns.
Rob has said that it would generally be wasteful to discard portions of returned
values, and better to just write a function to return what you are actually
going to use. This makes sense, until you actually try to put it into practice.
I can't re-write the date() function to return only the portion I intend to use.
I can, of course, write my customer lookup functions to return only
a slice, but the syntax winds up somewhat less readable than the "sliced" return
would be.
Regards,
Irv
|
Not Categorized, Please Help
|
|