[issue39648] Update math.gcd() to accept "n" arguments.

2020-02-22 Thread Ananthakrishnan
Ananthakrishnan added the comment: >>Sorry, Ananthakrishnan, but I think this problem is too difficult to you. >>Adding math.lcm() taken 2 weeks and produced 200 messages. It is simpler to >>implement this feature myself to me. I'm a beginner.Not everyone is perfect

[issue39648] Update math.gcd() to accept "n" arguments.

2020-02-21 Thread Ananthakrishnan
Change by Ananthakrishnan : -- keywords: +patch pull_requests: +17959 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18590 ___ Python tracker <https://bugs.python.org/issu

[issue39648] Update math.gcd() to accept "n" arguments.

2020-02-21 Thread Ananthakrishnan
Ananthakrishnan added the comment: Thanks for the hint.Made changes. -- ___ Python tracker <https://bugs.python.org/issue39648> ___ ___ Python-bugs-list mailin

[issue39648] Update math.gcd() to accept "n" arguments.

2020-02-21 Thread Ananthakrishnan
Ananthakrishnan added the comment: Yes I know. -- ___ Python tracker <https://bugs.python.org/issue39648> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39648] Update math.gcd() to accept "n" arguments.

2020-02-20 Thread Ananthakrishnan
Ananthakrishnan added the comment: This is my code for math.gcd: static PyObject * math_gcd(PyObject *module, PyObject *args, Py_ssize_t n) { PyObject *g = 0, *item, *in; Py_ssize_t i; for (i = 0; i < n; i++) { item = args[i]; in = PyNumber_Index(i

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2020-02-19 Thread Ananthakrishnan
Ananthakrishnan added the comment: I want to do a PR,if this is still needeed. -- nosy: +Ananthakrishnan ___ Python tracker <https://bugs.python.org/issue6

[issue38872] Document exec symbol for codeop.compile_command

2020-02-19 Thread Ananthakrishnan
Ananthakrishnan added the comment: code.compile_command takes _exec_ as symbol.As it is not documented or mentioned anywhere I can't find any details about that.Can anyone please tell me what it does? -- nosy: +Ananthakrishnan ___ Python tracker

[issue39379] sys.path[0] is already absolute path

2020-02-19 Thread Ananthakrishnan
Change by Ananthakrishnan : -- keywords: +patch pull_requests: +17941 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18561 ___ Python tracker <https://bugs.python.org/issu

[issue39560] PyUnicode_FromKindAndData kind transformation is not documented

2020-02-19 Thread Ananthakrishnan
Ananthakrishnan added the comment: Can i add a pull request for this. -- nosy: +Ananthakrishnan ___ Python tracker <https://bugs.python.org/issue39560> ___ ___

[issue17422] language reference should specify restrictions on class namespace

2020-02-19 Thread Ananthakrishnan
Ananthakrishnan added the comment: I just addded a PR for this issue. -- nosy: +Ananthakrishnan ___ Python tracker <https://bugs.python.org/issue17422> ___ ___

[issue17422] language reference should specify restrictions on class namespace

2020-02-19 Thread Ananthakrishnan
Change by Ananthakrishnan : -- pull_requests: +17939 pull_request: https://github.com/python/cpython/pull/18559 ___ Python tracker <https://bugs.python.org/issue17

[issue39572] [typing] TypedDict's 'total' argument is undocumented

2020-02-19 Thread Ananthakrishnan
Ananthakrishnan added the comment: yes,I'm interested in writing docs for the `__required_keys__` and `__total_keys__` attributes. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39572] [typing] TypedDict's 'total' argument is undocumented

2020-02-18 Thread Ananthakrishnan
Change by Ananthakrishnan : -- keywords: +patch pull_requests: +17935 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/18554 ___ Python tracker <https://bugs.python.org/issu

[issue39572] [typing] TypedDict's 'total' argument is undocumented

2020-02-18 Thread Ananthakrishnan
Ananthakrishnan added the comment: yes,I'm interested. -- ___ Python tracker <https://bugs.python.org/issue39572> ___ ___ Python-bugs-list mailing list Unsub

[issue39572] [typing] TypedDict's 'total' argument is undocumented

2020-02-18 Thread Ananthakrishnan
Ananthakrishnan added the comment: It will be usefull if we document _total_ argument also. -- ___ Python tracker <https://bugs.python.org/issue39572> ___ ___

[issue39572] [typing] TypedDict's 'total' argument is undocumented

2020-02-18 Thread Ananthakrishnan
Ananthakrishnan added the comment: https://stackoverflow.com/questions/58427394/what-is-the-meaning-of-total-dunder-attribute-in-python-3 questions about this. -- nosy: +Ananthakrishnan ___ Python tracker <https://bugs.python.org/issue39

[issue39635] One paragraph of the doc is not translated in French

2020-02-18 Thread Ananthakrishnan
Change by Ananthakrishnan : -- keywords: +patch pull_requests: +17932 stage: -> patch review pull_request: https://github.com/python/cpython/pull/1153 ___ Python tracker <https://bugs.python.org/issu

[issue39648] Update math.gcd() to accept "n" arguments.

2020-02-18 Thread Ananthakrishnan
Ananthakrishnan added the comment: Can I put together a PR for this issue? -- ___ Python tracker <https://bugs.python.org/issue39648> ___ ___ Python-bugs-list m

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-02-18 Thread Ananthakrishnan
Change by Ananthakrishnan : -- pull_requests: +17925 pull_request: https://github.com/python/cpython/pull/18547 ___ Python tracker <https://bugs.python.org/issue39

[issue36184] [EASY] test_gdb.test_threads() is specific to _POSIX_THREADS, fail on FreeBSD

2020-02-17 Thread Ananthakrishnan
Change by Ananthakrishnan : -- keywords: +patch pull_requests: +17915 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18538 ___ Python tracker <https://bugs.python.org/issu

[issue9182] document “--” as a way to distinguish option w/ narg='+' from positional argument in argparse

2020-02-17 Thread Ananthakrishnan
Ananthakrishnan added the comment: Is this issue still needed? Can I add a pull request for this. -- nosy: +Ananthakrishnan ___ Python tracker <https://bugs.python.org/issue9

[issue39648] Update math.gcd() to accept "n" arguments.

2020-02-17 Thread Ananthakrishnan
Ananthakrishnan added the comment: It should take variable number of positional arguments. it should return: >>math.gcd() 0 >>math.gcd(8) 8 >>math.gcd(-8) 8 -- ___ Python tracker <https://bugs.

[issue39648] Update math.gcd() to accept "n" arguments.

2020-02-16 Thread Ananthakrishnan
Ananthakrishnan added the comment: It will take more time to write the statement itself and there are chances of getting mistakes as the statement is complicated. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39648] Update math.gcd() to accept "n" arguments.

2020-02-16 Thread Ananthakrishnan
New submission from Ananthakrishnan : If we have to find the gcd of three or more numbers, now we should use gcd(a, gcd(b, gcd(c, gcd(d, e) which will create lot of problems. math.gcd should take "n" number of arguments,like: gcd(a,b,c,) gcd(4,6,8)//returns 2 g

[issue39644] Add Binary module.

2020-02-16 Thread Ananthakrishnan
Ananthakrishnan added the comment: I think this is not present in python. This module should contain operations that can be performed on binary numbers. In the below examples a and b are binary numbers. binary.add(a,b) binary.sub(a,b) binary.mul(a,b) binary.div(a,b) binary.ones_complement

[issue39644] Add Binary module.

2020-02-16 Thread Ananthakrishnan
Ananthakrishnan added the comment: I meant a module for "binary number". It can do operations on binary number. -- ___ Python tracker <https://bugs.python.o

[issue39644] Add Binary module.

2020-02-16 Thread Ananthakrishnan
Change by Ananthakrishnan : -- components: +Library (Lib) -C API ___ Python tracker <https://bugs.python.org/issue39644> ___ ___ Python-bugs-list mailin

[issue39644] Add Binary module.

2020-02-16 Thread Ananthakrishnan
Ananthakrishnan added the comment: It operates only on 0 and 1 -- ___ Python tracker <https://bugs.python.org/issue39644> ___ ___ Python-bugs-list mailin

[issue39644] Add Binary module.

2020-02-16 Thread Ananthakrishnan
Ananthakrishnan added the comment: It is "addition". I meant binary addition: 1110+1010=11000. -1000=0111 -- ___ Python tracker <https://bugs.python.o

[issue39644] Add Binary module.

2020-02-15 Thread Ananthakrishnan
Change by Ananthakrishnan : -- nosy: +mark.dickinson, serhiy.storchaka, tim.peters -Ananthakrishnan ___ Python tracker <https://bugs.python.org/issue39

[issue39644] Add Binary module.

2020-02-15 Thread Ananthakrishnan
New submission from Ananthakrishnan : Add binary module that has binary operations like: binary addition. binary subtracion. binary multiplication. binary division. compliment. 1's complement. 2's complement. cconverting to various number system. converting to BCD. converting to grey code. K

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-02-04 Thread Ananthakrishnan
Change by Ananthakrishnan : -- keywords: +patch pull_requests: +17719 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18328 ___ Python tracker <https://bugs.python.org/issu

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-01-30 Thread Ananthakrishnan A S
Ananthakrishnan A S added the comment: Yes,I want to put together a PR. -- ___ Python tracker <https://bugs.python.org/issue39479> ___ ___ Python-bugs-list m

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-01-29 Thread Ananthakrishnan A S
Ananthakrishnan A S added the comment: I agree with Vedran Čačić.As the modules are not made for one person but it is for the ease of coding.There are so many functions which i don't use but used by other people.We are using functions to make coding easy and if lcm function is added many

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-01-28 Thread Ananthakrishnan A S
Ananthakrishnan A S added the comment: some problems that needs lcm function: 1:find the least number which when divided by 'a','b','c','d' leaves remainder 'e' in each case. 2:person A exercises every 'n' days and person B every 'm' days. A and B both exercised today. How many days

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-01-28 Thread Ananthakrishnan A S
Ananthakrishnan A S added the comment: Should i proceed with adding a pull request for adding a 'lcm' function in python's math module. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-01-28 Thread Ananthakrishnan A S
Ananthakrishnan A S added the comment: I created this issue as i came across the following question: There are n students in class A,and m students in class B.each class divides into teams for a competition.What is the biggest possible team size that can be divided,such that each team has

[issue39479] can we add a lcm and gcd function.

2020-01-28 Thread Ananthakrishnan A S
New submission from Ananthakrishnan A S : can we add an lcm and gcd function that can work as: lcm(4,6) # returns 12 gcd(4,6) # returns 2 -- components: Library (Lib) messages: 360875 nosy: Ananthakrishnan A S priority: normal severity: normal status: open title: can we add a lcm

[issue39478] can we add a median function

2020-01-28 Thread Ananthakrishnan A S
New submission from Ananthakrishnan A S : add a function called 'median' that we can use like: list=[1,2,3,4,5,6,7,8,9] # declaring list median(list) #returns 5 -- components: Library (Lib) messages: 360873 nosy: Ananthakrishnan A S priority: normal severity: normal status