Re: Questions about API documentation

2017-03-07 Thread Steven D'Aprano
On Tue, 07 Mar 2017 17:06:03 -0800, selphiron wrote: > Hello, > > I am trying to understand how to write good API documentation. Nice questions! > 1) How much should I (or a documentation author in general) go into > detail? I don’t want to bore experienced users, but I don’t want to > scare b

Re: Unicode support in Python 2.7.8 - 16 bit

2017-03-07 Thread Steven D'Aprano
On Tue, 07 Mar 2017 14:05:15 -0800, John Nagle wrote: > How do I test if a Python 2.7.8 build was built for 32-bit Unicode? sys.maxunicode will be 1114111 if it is a "wide" (32-bit) build and 65535 if it is a "narrow" (16-bit) build. You can double-check with: unichr(0x10) # will raise V

Re: Better way to do this dict comprehesion

2017-03-07 Thread Sayth Renshaw
> > But the given problem states there will always only be one number appearing > > an odd number of times given that is there a neater way to get the answer? > > Take a step back for a moment. Are you trying to find something that > appears an odd number of times, or a number of times that coun

Re: Better way to do this dict comprehesion

2017-03-07 Thread Chris Angelico
On Wed, Mar 8, 2017 at 1:55 PM, MRAB wrote: > Using Counter seems like a simpler way to me. I wouldn't bother about other > ways unless that way wasn't "good enough" for some reason. Maybe. But without being sure what the goal is, it's hard to say. ChrisA -- https://mail.python.org/mailman/list

Re: Better way to do this dict comprehesion

2017-03-07 Thread MRAB
On 2017-03-08 02:37, Chris Angelico wrote: On Wed, Mar 8, 2017 at 1:28 PM, Sayth Renshaw wrote: I have got this dictionary comprehension and it works but how can I do it better? from collections import Counter def find_it(seq): counts = dict(Counter(seq)) a = [(k, v) for k,v in cou

Re: Better way to do this dict comprehesion

2017-03-07 Thread Chris Angelico
On Wed, Mar 8, 2017 at 1:28 PM, Sayth Renshaw wrote: > I have got this dictionary comprehension and it works but how can I do it > better? > > from collections import Counter > > def find_it(seq): > counts = dict(Counter(seq)) > a = [(k, v) for k,v in counts.items() if v % 3 == 0] >

Re: No module named 'encodings' Python 3.6 on Windows 10 failure

2017-03-07 Thread MRAB
On 2017-03-08 01:24, schneid...@law.byu.edu wrote: Every attempt to make Python 3.6.0 or 3.6.1rc1 to run on Windows 10 has resulted in the error message shown below. I was running Python 3.5.2 successfully and wanted to upgrade. C:\Python36-32>python Fatal Python error: Py_Initialize: unabl

Better way to do this dict comprehesion

2017-03-07 Thread Sayth Renshaw
Hi I have got this dictionary comprehension and it works but how can I do it better? from collections import Counter def find_it(seq): counts = dict(Counter(seq)) a = [(k, v) for k,v in counts.items() if v % 3 == 0] return a[0][0] test_seq = [20,1,-1,2,-2,3,3,5,5,1,2,4,20,4,-1,-

Re: No module named 'encodings' Python 3.6 on Windows 10 failure

2017-03-07 Thread eryk sun
On Wed, Mar 8, 2017 at 1:24 AM, wrote: > > Every attempt to make Python 3.6.0 or 3.6.1rc1 to run on Windows 10 > has resulted in the error message shown below. I was running Python > 3.5.2 successfully and wanted to upgrade. > > C:\Python36-32>python > Fatal Python error: Py_Initialize: unable t

No module named 'encodings' Python 3.6 on Windows 10 failure

2017-03-07 Thread schneiderw
Every attempt to make Python 3.6.0 or 3.6.1rc1 to run on Windows 10 has resulted in the error message shown below.  I was running Python 3.5.2 successfully and wanted to upgrade.  C:\Python36-32>python Fatal Python error: Py_Initialize: unable to load the file system codec ModuleNotFoundError

Questions about API documentation

2017-03-07 Thread selphiron
Hello, I am trying to understand how to write good API documentation. I have read “7. Documenting Python” in the python developers guide [1] and skimmed the Doc-SIG email archives, but I still have some questions and I would appreciate your help. (Whenever I refer to me in the following questio

Re: str.title() fails with words containing apostrophes

2017-03-07 Thread D'Arcy Cain
On 2017-03-06 06:33 PM, Steve D'Aprano wrote: If you read "title case" as *literally* as being only for titles (of books, I believe there is only one conclusion to be drawn from this thread - There is still a place for human proofreaders. I'm taking that as good news. -- D'Arcy J.M. Cain V

Re: Oracle Database

2017-03-07 Thread Joaquin Henriquez
  Original Message   >What is the easiest way to connect to an Oracle Database >using python in >order to run queries? ‎You should check module cx_Oracle -- https://mail.python.org/mailman/listinfo/python-list

Re: Unicode support in Python 2.7.8 - 16 bit

2017-03-07 Thread Terry Reedy
On 3/7/2017 5:05 PM, John Nagle wrote: How do I test if a Python 2.7.8 build was built for 32-bit Unicode? (I'm dealing with shared hosting, and I'm stuck with their provided versions.) If I give this to Python 2.7.x: sy = u'\U0001f60f' len(sy) is 1 on a Ubuntu 14.04LTS machine, but 2

Re: Unicode support in Python 2.7.8 - 16 bit

2017-03-07 Thread Chris Angelico
On Wed, Mar 8, 2017 at 9:05 AM, John Nagle wrote: >How do I test if a Python 2.7.8 build was built for 32-bit > Unicode? (I'm dealing with shared hosting, and I'm stuck > with their provided versions.) > > If I give this to Python 2.7.x: > > sy = u'\U0001f60f' > > len(sy) is 1 on a Ubuntu

Unicode support in Python 2.7.8 - 16 bit

2017-03-07 Thread John Nagle
How do I test if a Python 2.7.8 build was built for 32-bit Unicode? (I'm dealing with shared hosting, and I'm stuck with their provided versions.) If I give this to Python 2.7.x: sy = u'\U0001f60f' len(sy) is 1 on a Ubuntu 14.04LTS machine, but 2 on the Red Hat shared hosting machine.

Invitation to support our research (by responding to the questionnaire) on analogy based code reuse

2017-03-07 Thread maria . katic
At Birkbeck, University of London in collaboration with the Faculty of Electrical Engineering and Computing, University of Zagreb, we are doing research on reusing source code based on analogical reasoning. We appreciate the importance of your time and we hope you will be able to invest approx

Re: Oracle Database

2017-03-07 Thread Chris Angelico
On Wed, Mar 8, 2017 at 6:21 AM, Robert James Liguori wrote: > What is the easiest way to connect to an Oracle Database using python in > order to run queries? There's a Python package called cx_oracle that provides a standardized interface. You can run queries using that. https://pypi.python.or

Oracle Database

2017-03-07 Thread Robert James Liguori
What is the easiest way to connect to an Oracle Database using python in order to run queries? -- https://mail.python.org/mailman/listinfo/python-list

Need help generating Contour and HeatMap plots

2017-03-07 Thread Umar Yusuf
Hello house, I kindly need your input here >> http://stackoverflow.com/questions/42655870/matplotlib-convert-scatter-plot-to-contour-and-heatmap-plots -- https://mail.python.org/mailman/listinfo/python-list

custom setup.py link argument order

2017-03-07 Thread Gabriel Ganne
Hi, I'm currently writing a python C module which has a chained dependency: - mymodule requires libb - libb requires liba To that effect, within setup.py, I link against both liba and libb libraries=['a', 'b'], Also, as I'm working on Ubuntu, I want to add -Wl,--no-as-needed to make sure

Re: Importing with ctypes in Python: fighting overflows

2017-03-07 Thread eryk sun
On Tue, Mar 7, 2017 at 12:45 PM, wrote: > Importing with ctypes in Python: fighting overflows: > https://www.cossacklabs.com/blog/fighting-ctypes-overflows.html C int is 32-bit on all platforms currently supported by CPython -- both 32-bit and 64-bit. It's the default result type and the default

Re: spam issue

2017-03-07 Thread Gene Heskett
On Tuesday 07 March 2017 01:00:41 Greg Couch wrote: > On Thursday, March 2, 2017 at 8:08:44 AM UTC-8, Andrew Zyman wrote: > > Why is this group have such an obscene number of spam posts ? > > I'm subscribed to a few other google groups and this is the only one > > that has this issue. > > If you d

Importing with ctypes in Python: fighting overflows

2017-03-07 Thread borysova . mary
Importing with ctypes in Python: fighting overflows: https://www.cossacklabs.com/blog/fighting-ctypes-overflows.html Best cases of boring technical debt are understood when reflected properly. This post addresses a simple one: inelegant flags in core C library ended up breaking Python tests. Th

Re: Basic Packaging strategy question

2017-03-07 Thread Paul Moore
On Tuesday, 7 March 2017 01:45:10 UTC, bilm...@gmail.com wrote: > It still seems strange to me that such a well documented ecosystem does not > have an official way to package a complete app ( vs packages ). Well, it's a combination of history, the fact that the whole thing is platform depen