[issue44915] Python keywords as string keys in TypedDict

2021-08-14 Thread Doug Hoskisson
New submission from Doug Hoskisson : I'm running into an issue with the syntax of https://www.python.org/dev/peps/pep-0589/ ``` class C(TypedDict): to: int from: int SyntaxError: invalid syntax ``` I'm not sure any change needs to be made to the specificatio

[issue27624] unclear documentation on Queue.qsize()

2016-07-26 Thread Doug Hoskisson
New submission from Doug Hoskisson: The documentation for Queue.qsize(): "Return the approximate size of the queue." "approximate" is unclear. It might suggest some strategy used for approximating, or it might be the exact size at an arbitrary time. It shoul

[issue27624] unclear documentation on Queue.qsize()

2016-07-26 Thread Doug Hoskisson
Doug Hoskisson added the comment: Some strategies for approximating might report a size the the queue has never been and never will be. For example, a strategy could gather data and find the size is increasing at some rate, and approximate based on that rate, but then the rate of increase

[issue27624] unclear documentation on Queue.qsize()

2016-07-26 Thread Doug Hoskisson
Doug Hoskisson added the comment: The way that this whole page of documentation is written does not suggest that this class is ONLY for use in a multi-threaded setting. This class can be used without multi-threading, right? Wouldn't it be useful to know whether this function does giv

[issue27624] unclear documentation on Queue.qsize()

2016-07-26 Thread Doug Hoskisson
Doug Hoskisson added the comment: One thing that is important to recognize in considering this, is which information is specific to what is being documented, and which information is more general. Some people may think that documentation should only give information specific to what is being

[issue27624] unclear documentation on Queue.qsize()

2016-07-26 Thread Doug Hoskisson
Doug Hoskisson added the comment: My suggestion for this documentation: """ Return the number of items in the queue. Note, in multi-threading this mostly just serves as an approximation, and information from this doesn’t guarantee that a subsequent get() or put()

[issue27624] unclear documentation on Queue.qsize()

2016-07-27 Thread Doug Hoskisson
Doug Hoskisson added the comment: More explicit is ok, if that's what people want, but just not in the first sentence, because that stuff has nothing to do with what is being documented specifically (as evidenced by referencing a wikipedia article that doesn't even mention python)

[issue27624] unclear documentation on Queue.qsize()

2016-07-27 Thread Doug Hoskisson
Doug Hoskisson added the comment: It is inconsistent with other documentation right next to it. Should the documentation for empty() say "Return True if the queue is approximately empty, False otherwise."? Should the documentation for full() say "Return True if the queue is app

[issue27624] unclear documentation on Queue.qsize()

2016-07-27 Thread Doug Hoskisson
Doug Hoskisson added the comment: If the specification of the empty method is to return whether the queue is empty, then the programmers have failed to meet that specification, because by the time you get that return value, it might not be empty anymore

[issue27624] unclear documentation on Queue.qsize()

2016-07-27 Thread Doug Hoskisson
Doug Hoskisson added the comment: My suggestion was not to delete the "approximate" entirely. Just move it out of the first sentence to make it more consistent with the other documentation. This is the model I'm seeing in empty() and full(): The first sentence is something si