Wayne Boucher wrote:
> Hello,
>
> I didn't like list comprehensions when I first used them, but soon enough
> you start to see how good they are, and they're fairly readable on the
> whole, certainly once you've used them a few times. (They're also more
> efficient than the alternative, as well as being one line instead of
> four.)
>
>
It's perhaps the lack of punctuation in them that is a bit disturbing
... anyhow this isn't the place for this discussion.
> I think "belonging" to a window is probably in the eye of the beholder.
> Some people might say that is the case if the spectrum is visible (so, in
> code, view.isPosVisible or view.isNegVisible), or perhaps is listed in the
> toolbar (view.isInToolbar), or perhaps is just mappable (in theory) to the
> window (view, period). We could have functions for each of these (we
> already have two out of the three), and no doubt other alternatives (e.g.
> related to ndim).
>
>
The code snippet you gave me seems quite adequate, and as simple
attributes exist that can be tested then I probably say keep things as
simple as possible and don't provide yet more functions.
Cheers
Jeremy
--
*********************************************************************************
Dr C. Jeremy Craven
Department of Molecular Biology and Biotechnology
University of Sheffield,
Firth Court, Western Bank
S10 2TN Sheffield UK
e-mail: [log in to unmask]
http://www.nmr.group.shef.ac.uk/CJC.html
Phone: x24323
From outside Sheffield: 0114 222 4323
From outside UK: +44 114 2224323
Fax: 0114 272 2800
*********************************************************************************
|