Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev
Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)
 

Index | Next | Previous | View Flat


cs at zip

Apr 2, 2012, 3:44 PM


Views: 303
Permalink
Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) [In reply to]

On 03Apr2012 07:38, I wrote:
| On 02Apr2012 13:37, Victor Stinner <victor.stinner [at] gmail> wrote:
| | Should I use
| | MONTONIC_CLOCKS or HIRES_CLOCKS when I would like a monotonic and
| | high-resolution clock?
|
| Note that you don't need to provide a clock list at all; get_clock(0
| will use ALL_CLOCKS by default, and hires() and monotonic() should each
| have their own default list.
[...]
| | It would be simpler to have only one global and
| | *private* list.
[...]
| The whole point is to let the user be _able_ to control the choices to a
| fair degree without platform special knowledge.

On some reflection I may lean a little more Victor's way here:

I am still very much of the opinion that there should be multiple clock lists
so that hires() can offer the better hires clocks first and so forth.

However, perhaps I misunderstood and he was asking if he needed to name
a list to get a hires clock etc. This intent is not to need to, via the
convenience functions.

Accordingly, maybe the list names needn't be published, and may complicate
the published interface even though they're one to one with the flags.

It would certainly up the ante slightly f we added more
flags some time later. (For example, I think any synthetic clocks
such as the caching example in the skeleton should probably have a
SYNTHETIC flag. You might never ask for it, but you should be able to
check for it.

(I personally suspect some of the OS clocks are themselves synthetic,
but no matter...)

The flip side of this of course is that if the list names are private then
the get_clock() and hires() etc functions almost mandatorially need the
optional all_clocks=False parameter mooted in a sibling post; the really
picky user needs a way to iterate over the available clocks to make a fine
grained decision. On example would be to ask for monotonic clocks but omit
synthetic ones (there's a synthetic clock in the skeleton though I don't
partiularly expect one in reality - that really is better in a broader
"*utils" module; I also do NOT want to get into complicated parameters
to say these flags but not _those_ flags and so forth for other metadata.

And again, an external module offering synthetic clocks could easily want to
be able to fetch the existing and augument the list with its own, then use
that with the get_clock() interfaces.

So in short I think:

- there should be, internally at least, multiple lists for quality of
returned result

- there should be a way to iterate over the available clocks, probably
via an all_clocks paramater instead of a public list name

Cheers,
--
Cameron Simpson <cs [at] zip> DoD#743
http://www.cskk.ezoshosting.com/cs/

There is hopeful symbolism in the fact that flags do not wave in a vacuum.
- Arthur C. Clarke
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Subject User Time
an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) cs at zip Apr 1, 2012, 5:43 PM
    Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) victor.stinner at gmail Apr 2, 2012, 4:37 AM
    Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) cs at zip Apr 2, 2012, 2:38 PM
        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) cs at zip Apr 2, 2012, 2:51 PM
            Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) cs at zip Apr 2, 2012, 3:05 PM
        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) cs at zip Apr 2, 2012, 3:44 PM
        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) regebro at gmail Apr 2, 2012, 10:51 PM
        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) victor.stinner at gmail Apr 3, 2012, 4:45 PM
    Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) cs at zip Apr 2, 2012, 11:03 PM
        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) breamoreboy at yahoo Apr 3, 2012, 1:03 AM
            Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) cs at zip Apr 3, 2012, 1:43 AM
                Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) greg.ewing at canterbury Apr 3, 2012, 5:04 PM
                    Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) breamoreboy at yahoo Apr 3, 2012, 5:18 PM
        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) regebro at gmail Apr 3, 2012, 7:09 AM
    Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) ethan at stoneleaf Apr 3, 2012, 9:07 AM
        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) cs at zip Apr 3, 2012, 2:42 PM
            Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) ethan at stoneleaf Apr 3, 2012, 3:08 PM
                Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) cs at zip Apr 3, 2012, 4:38 PM
                    Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) ncoghlan at gmail Apr 3, 2012, 4:46 PM
        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) regebro at gmail Apr 4, 2012, 8:47 AM
    Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) cs at zip Apr 3, 2012, 7:46 PM
    Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) p.f.moore at gmail Apr 4, 2012, 1:21 AM
    Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) ethan at stoneleaf Apr 4, 2012, 9:18 AM
        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) g.brandl at gmx Apr 4, 2012, 10:47 AM
            Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) ethan at stoneleaf Apr 4, 2012, 11:06 AM
            Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) cs at zip Apr 4, 2012, 3:06 PM
    Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) phd at phdru Apr 4, 2012, 10:44 AM
        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) ethan at stoneleaf Apr 4, 2012, 11:03 AM
            Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) phd at phdru Apr 4, 2012, 12:24 PM
                Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) ethan at stoneleaf Apr 4, 2012, 12:52 PM
                    Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) phd at phdru Apr 4, 2012, 4:05 PM
                        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) stephen at xemacs Apr 5, 2012, 6:06 AM
                        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) ethan at stoneleaf Apr 5, 2012, 11:56 AM
                            Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) phd at phdru Apr 5, 2012, 1:15 PM
                                Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) ethan at stoneleaf Apr 5, 2012, 1:49 PM
                                Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) cs at zip Apr 5, 2012, 3:08 PM
                        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) cs at zip Apr 5, 2012, 3:05 PM
                Re: an alternative to embedding policy in PEP 418 steve at pearwood Apr 4, 2012, 3:50 PM
                    Re: an alternative to embedding policy in PEP 418 cs at zip Apr 4, 2012, 4:14 PM
                        Re: an alternative to embedding policy in PEP 418 steve at pearwood Apr 6, 2012, 3:25 AM
                            Re: an alternative to embedding policy in PEP 418 cs at zip Apr 6, 2012, 4:11 PM
                                Re: an alternative to embedding policy in PEP 418 v+python at g Apr 6, 2012, 5:30 PM
                                    Re: an alternative to embedding policy in PEP 418 cs at zip Apr 6, 2012, 9:22 PM
    Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) phd at phdru Apr 5, 2012, 6:34 AM
        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) stephen at xemacs Apr 5, 2012, 7:45 AM
    Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) phd at phdru Apr 5, 2012, 8:22 AM
        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) rdmurray at bitdance Apr 5, 2012, 8:38 AM
            Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) phd at phdru Apr 5, 2012, 9:02 AM
        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) phd at phdru Apr 5, 2012, 9:01 AM
        Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) stephen at xemacs Apr 5, 2012, 7:57 PM
    Re: an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock) murman at gmail Apr 6, 2012, 4:31 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.