[issue33965] [Windows WSL] Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time, after year 2038

2019-07-04 Thread Franklin? Lee
Franklin? Lee added the comment: Petter S reported the issue to Microsoft, and got the response that it was already fixed in Insider Preview. https://github.com/microsoft/WSL/issues/3514 Should be fixed in Windows 10 version 1809, according to the tags here: https://github.com/microsoft/WSL

[issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR.

2019-06-16 Thread Franklin? Lee
Franklin? Lee added the comment: > > It's likely also false that every entry will be checked, since presumably > > the function uses short-circuit logic. > This, however, would be good to verify first. Verified. https://github.com/python/cpython/blob/36dcaab7fde5d2e54cde

[issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR.

2019-06-16 Thread Franklin? Lee
Franklin? Lee added the comment: My mistake. I selected all versions after checking issubclass for 2.7 and several 3.x, but added the isinstance notes later without paying attention to versions. I copied the isinstance text from 3.2 docs. As you said, it's not the current

[issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR.

2019-06-16 Thread Franklin? Lee
New submission from Franklin? Lee : isinstance: > If classinfo is not a class (type object), it may be a tuple of type objects, > or may recursively contain other such tuples (other sequence types are not > accepted). issubclass: > classinfo may be a tuple of class objects, i

[issue32982] Parse out invisible Unicode characters?

2018-03-01 Thread Franklin? Lee
New submission from Franklin? Lee : The following line should have a character that trips up the compiler. ‎indices = range(5) The character is \u200e, and was inserted by Google Keep. (I've already reported the issue to Google as a regression.) Here's the error message: "&qu

[issue26632] __all__ decorator

2016-05-31 Thread Franklin? Lee
Franklin? Lee added the comment: BIKESHEDDING Here is another concern with decorators and `.__module__` (or `inspect.getmodule`). (Or is it the original concern?) If an earlier decorator creates a wrapper and doesn't set .__module__, you'll make the function public in the wr

[issue26632] __all__ decorator

2016-05-25 Thread Franklin? Lee
Franklin? Lee added the comment: I probably won't submit a patch, but I can definitely write a bunch of private notes toward a patch and forget about them. >_> Idea 1: Crawl up the call tree and see whether you hit a module definition or a class definition first. Idea 2: Inspect _

[issue27119] `compile` doesn't compile into an AST object as specified

2016-05-25 Thread Franklin? Lee
Franklin? Lee added the comment: > What you're looking for is in the 2nd paragraph of the ast docs: Oh. I considered that, but then compile's docs say: The optional arguments flags and dont_inherit control which future statements (see PEP 236) affect the compilat

[issue26632] __all__ decorator

2016-05-25 Thread Franklin? Lee
Franklin? Lee added the comment: >>If @public were only to be used as a decorator, it would not be possible to >>have `public` called on a function outside of its definition. But someone >>might call `public(some_decorator(some_function))`. > >Do you mean, they'd c

[issue27119] `compile` doesn't compile into an AST object as specified

2016-05-24 Thread Franklin? Lee
New submission from Franklin? Lee: >From `compile`'s doc: "Compile the source into a code or AST object." The docs don't say how to compile into an AST object with `compile`, though. As it says later: "If you want to parse Python code into its AST represent

[issue26632] __all__ decorator

2016-05-23 Thread Franklin? Lee
Franklin? Lee added the comment: >I don't know, but what practical effect will this have? I.e. under what >conditions would you @public wrap a @functools.wraps function and want it to >show up in __all__? Do you have a specific use case? I sometimes wrap functions that retur

[issue26632] __all__ decorator

2016-05-20 Thread Franklin? Lee
Franklin? Lee added the comment: I like how ``@public`` keeps the declaration close to the definition. I am iffy about using ``public`` to define other values. That part might be considered unpythonic. Implementation issues: - ``__module__`` is not reliable. ``functools.wraps`` changes

[issue27062] `inspect` doesn't have `__all__`

2016-05-19 Thread Franklin? Lee
New submission from Franklin? Lee: `inspect`'s names are pretty close to unique, except for `stack`, `unwrap`, and `trace`. It doesn't define `__all__`, though. -- components: Library (Lib) messages: 265893 nosy: leewz priority: normal severity: normal status: open title

[issue27000] improve document of filter

2016-05-11 Thread Franklin? Lee
Franklin? Lee added the comment: In that case, I'm still wondering what you mean by "not equivalent". Are you saying there is code which will work only if the ``bool`` function is really called? -- ___ Python tracker <http

[issue27000] improve document of filter

2016-05-11 Thread Franklin? Lee
Franklin? Lee added the comment: > Although I still think it's telling readers incorrect info in the second > part. For ``bool``, it is not equivalent to ``(item for item in iterable if > function(item))`` but ``(item for item in iterable if item)``. For CPython, > you ar

[issue27000] improve document of filter

2016-05-11 Thread Franklin? Lee
Franklin? Lee added the comment: Aren't these both implementation details? As in, they only affect efficiency, not effect, right? -- nosy: +leewz ___ Python tracker <http://bugs.python.org/is