[issue44420] Add CapWords classes to datetime module?

2021-06-14 Thread Douglas Thor
Douglas Thor added the comment: Thanks for the info! Rejecting issue, as it would not be feasible to maintain going forward. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bug

[issue44420] Add CapWords classes to datetime module?

2021-06-14 Thread Douglas Thor
Douglas Thor added the comment: Thanks for correcting the version selection. > the old names could never be removed ... it's not worth the hassle I had the same thought, so I spent a lot of time trying to come up with "Benefits", haha. I'm OK with this being close

[issue34025] SMTP EmailPolicy not using the correct line length for RCF 2045 encoded data (is 78, should be 76)

2021-06-14 Thread Douglas Thor
Change by Douglas Thor : -- nosy: -Douglas Thor ___ Python tracker <https://bugs.python.org/issue34025> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34025] SMTP EmailPolicy not using the correct line length for RCF 2045 encoded data (is 78, should be 76)

2021-06-14 Thread Douglas Thor
Change by Douglas Thor : -- nosy: +dougthor42 ___ Python tracker <https://bugs.python.org/issue34025> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44420] Add CapWords classes to datetime module?

2021-06-14 Thread Douglas Thor
New submission from Douglas Thor : Has there been any discussion on adding CapWords class names to the datetime.py module? I searched through the bug tracker ("CapWords" and "CamelCase") and didn't find anything, but perhaps I'm not searching for the correct keywords. Eg

[issue41232] Python `functools.wraps` doesn't deal with defaults correctly

2021-05-03 Thread Thor Whalen
Thor Whalen added the comment: On the surface, seems like a fair design to me: Back-compatible yet solves this misalignment that bugged me (literally). It would also force the documentation of `functools.wraps` to mention this "trap", through describing the `signature_cha

[issue41232] Python `functools.wraps` doesn't deal with defaults correctly

2020-08-05 Thread Thor Whalen
Thor Whalen added the comment: You are the guardians of the great python, so we can leave it at that if you want. That said for posterity, I'll offer a defense. The same "the tools does what it does, and if you need something else, use another tool" argument could have been appli

[issue41232] Python `functools.wraps` doesn't deal with defaults correctly

2020-08-04 Thread Thor Whalen
Thor Whalen added the comment: Hi Terry, sorry for the later reply. Is this a bugfix? Well, I'm not sure what you would call a bug. Can't one always redefine a bug to be a feature, and visa versa? I would definitely say that the behavior (seeing one default in the signature, but a different

[issue41232] Python `functools.wraps` doesn't deal with defaults correctly

2020-07-07 Thread Thor Whalen
Thor Whalen added the comment: Further, note that even with the additional '__defaults__', and '__kwdefaults__', `functools.wraps` breaks when keyword only arguments involved: ``` from functools import wraps, WRAPPER_ASSIGNMENTS, partial # First, I need to add `__defaults__

[issue41232] Python `functools.wraps` doesn't deal with defaults correctly

2020-07-07 Thread Thor Whalen
Thor Whalen added the comment: Posted to stackoverflow to gather opinions about the issue: https://stackoverflow.com/questions/62782230/python-functools-wraps-doesnt-deal-with-defaults-correctly Also made GitHub PR: https://github.com/python/cpython/pull/21379 -- keywords: +patch

[issue41232] Python `functools.wraps` doesn't deal with defaults correctly

2020-07-07 Thread Thor Whalen
New submission from Thor Whalen : # PROBLEM When using `functools.wraps`, the signature claims one set of defaults, but the (wrapped) function uses the original (wrappee) defaults. Why might that be the desirable default? # PROPOSED SOLUTION Adding '__defaults__', '__kwdefaults__

[issue40374] collections.abc docs table: Mapping missing __reversed__

2020-04-24 Thread Thor Whalen
Thor Whalen added the comment: Dennis, Thanks for the (very complete) explanation. I induced to err because of the following confusing facts: ``` from collections.abc import Mapping, Sequence import sys if sys.version_info <= (2, 7): assert '__reversed__' not in dir(Mapping) e

[issue40374] collections.abc docs table: Mapping missing __reversed__

2020-04-23 Thread Thor Whalen
New submission from Thor Whalen : `Mapping.__reversed__` exists, but is not listed in the table: https://docs.python.org/3/library/collections.abc.html#collections-abstract-base-classes https://github.com/python/cpython/blob/master/Doc/library/collections.abc.rst -- assignee: docs

[issue34025] SMTP EmailPolicy not setting max_line_length as expected. RCF 2045 states 76 char, Default policy uses 78

2018-07-02 Thread Douglas Thor
New submission from Douglas Thor : It appears that the SMTP EmailPolicy object does not correctly set max_line_length. RFC 2045 (https://www.ietf.org/rfc/rfc2045.txt) requires a max_line_length of 76 characters, while email._policybase.Policy sets it to 78 (which typically is correct

Data peeping function?

2014-01-12 Thread Thor Whalen
The first thing I do once I import new data (as a pandas dataframe) is to .head() it, .describe() it, and then kick around a few specific stats according to what I see. But I'm not satisfied with .describe(). Amongst others, non-numerical columns are ignored, and off-the-shelf stats will be

[issue15807] Bogus versionchanged note in logging.handlers.MemoryHandler doc

2012-08-29 Thread Gunnlaugur Thor Briem
New submission from Gunnlaugur Thor Briem: In logging.handlers.MemoryHandler documentation: “Changed in version 2.6: credentials was added.” There's no `credentials` anywhere nearby, and at first glance I can't see anything new in `MemoryHandler` when this was introduced. Presumably

[issue15399] processName key is un-/mis-documented in 2.6 and up

2012-07-19 Thread Gunnlaugur Thor Briem
New submission from Gunnlaugur Thor Briem gunnlau...@gmail.com: The ``processName`` format mapping key in logging formats works in versions 2.6.*, 2.7.* and 3.1.* onwards; in 2.5 and down and in 3.0.1, ``format`` fails when this key is present in the format. But in 2.6.8 docs, this mapping

[issue8313] unprintable AssertionError object message in unittest tracebacks

2010-05-04 Thread Gunnlaugur Thor Briem
Gunnlaugur Thor Briem gunnlau...@gmail.com added the comment: Replacing the message with its repr seems to me at least strongly preferable to the current “hide it all” behavior. :) Better, msg.encode('ascii', 'backslashreplace') does what repr does with unencodable characters, but does

Re: list comprehension question

2009-05-01 Thread thor
On May 1, 2:28 pm, Arnaud Delobelle arno...@googlemail.com wrote: Ross ross.j...@gmail.com writes: If I have a list of tuples a = [(1,2), (3,4), (5,6)], and I want to return a new list of each individual element in these tuples, I can do it with a nested for loop but when I try to do it

Re: best way to do this

2008-12-02 Thread thor
On Dec 2, 10:09 pm, TP [EMAIL PROTECTED] wrote: Hi everybody, c=[(5,3), (6,8)] From c, I want to obtain a list with 5,3,6, and 8, in any order. I do this: [i for (i,j) in c] + [ j for (i,j) in c] [5, 6, 3, 8] Is there a quicker way to do this? c = [(5, 3), (6, 8)] [x for t in

Re: More like a shell command.

2008-08-06 Thread Thor
Maybe this module would work fine: http://docs.python.org/lib/module-cmd.html -- Angel -- http://mail.python.org/mailman/listinfo/python-list

Parallel python + ??

2008-06-11 Thread Thor
Hi, I am running a program using Parallel Python and I wonder if there is a way/module to know in which CPU/core the process is running in. Is that possible? Ángel -- http://mail.python.org/mailman/listinfo/python-list

Re: Parallel python + ??

2008-06-11 Thread Thor
Gerhard Häring wrote: This is of course OS-specific. On Linux, you can parse the proc filesystem: open(/proc/%i/stat % os.getpid()).read().split()[39] You can use the taskset utility to query or set CPU affinity on Linux. It is going to be in Linux (mainly) I was thinking about

Re: Access lotus notes using Python

2005-05-24 Thread Thor Arne Johansen
connection: mxODBC or the odbc provided by win32all) HTH, Thor Arne Johansen Technical Director Ibas AS -- http://mail.python.org/mailman/listinfo/python-list