Re: Awful code of the week

2016-08-08 Thread Chris Angelico
On Tue, Aug 9, 2016 at 3:20 PM, Steven D'Aprano wrote: >> def process(self, stuff): >> files = self.files >> files = [] # to save memory >> files = self.files >> for file in files: >> file.process(stuff) >> return 1 > > def process(self,

Re: Awful code of the week

2016-08-08 Thread Steven D'Aprano
On Tuesday 09 August 2016 13:59, Chris Angelico wrote: > On Tue, Aug 9, 2016 at 1:46 PM, Rick Johnson > wrote: >> On Sunday, August 7, 2016 at 1:54:51 AM UTC-5, Steven D'Aprano wrote: >>> Seen in the office IRC channel: >>> >>> >>> (13:23:07) fred: near_limit = [] >>> (13:23:07) fred: nea

Re: Awful code of the week

2016-08-08 Thread Chris Angelico
On Tue, Aug 9, 2016 at 1:46 PM, Rick Johnson wrote: > On Sunday, August 7, 2016 at 1:54:51 AM UTC-5, Steven D'Aprano wrote: >> Seen in the office IRC channel: >> >> >> (13:23:07) fred: near_limit = [] >> (13:23:07) fred: near_limit.append(1) >> (13:23:07) fred: near_limit = len(near_li

Re: Awful code of the week

2016-08-08 Thread Rick Johnson
On Sunday, August 7, 2016 at 1:54:51 AM UTC-5, Steven D'Aprano wrote: > Seen in the office IRC channel: > > > (13:23:07) fred: near_limit = [] > (13:23:07) fred: near_limit.append(1) > (13:23:07) fred: near_limit = len(near_limit) > (13:23:09) fred: WTF Sure, this code smells of naus

Specify the database for a Django ModelForm instance

2016-08-08 Thread Ben Finney
Howdy all, How can I specify which database (by its alias name) a Django ModelForm should use? (I've had trouble getting this question in to the Django forum, so I'm trying here as this is still Python-related.) A Django ModelForm knows its corresponding model, and the fields included. The Mode

Re: Running Python from the source repo

2016-08-08 Thread Random832
On Mon, Aug 8, 2016, at 15:25, Terry Reedy wrote: > Last January, I wrote a batch file to build all three versions with the > 'optional' extensions. I started rebuilding more often after this. > > 36\pcbuild\build.bat -e -d > 35\pcbuild\build.bat -e -d > 27\pcbuild\build.bat -e -d > > Thanks fo

Re: Running Python from the source repo

2016-08-08 Thread Zachary Ware
On Mon, Aug 8, 2016 at 2:25 PM, Terry Reedy wrote: > Last January, I wrote a batch file to build all three versions with the > 'optional' extensions. I started rebuilding more often after this. > > 36\pcbuild\build.bat -e -d > 35\pcbuild\build.bat -e -d > 27\pcbuild\build.bat -e -d > > Thanks for

Re: Python and 64bit Windows7

2016-08-08 Thread BartC
On 08/08/2016 13:44, James Santiago wrote: 4) I also went to DOS prompt or CMD screen, went to the directory where Python was located as follows: C:\Python>python exe -v. This returns several lines of information. I assume you meant "python.exe -v". (But the .exe is not needed.) For example

Re: Running Python from the source repo

2016-08-08 Thread Terry Reedy
On 8/8/2016 12:24 PM, Zachary Ware wrote: I generally assume that if I'm testing a patch, I'm going to need to rebuild regardless of what the patch actually touches. I often wait until the patch is applied before I do the rebuild, or if I'm manually testing a bug I go ahead and do the rebuild i

RE: python 3.5.2 lounch: api-ms-win-crt-runtime-l1-1-0.dll is missing ?

2016-08-08 Thread Joaquin Alzola
>I installed the version for windows 64. After a succesfull installation, the >same system error occurs on the lounch of the program: >api-ms-win-crt-runtime-l1-1-0.dll is missing. Sometimes google save you time more than the list: https://www.smartftp.com/support/kb/the-program-cant-start-bec

Re: Network protocols, sans I/O,(Hopefully) the future of network protocols in Python

2016-08-08 Thread Irmen de Jong
On 8-8-2016 12:37, Mark Lawrence wrote: > This may be of interest to some of you > http://www.snarky.ca/network-protocols-sans-i-o > I sure find it interesting. Will also watch Cory's PyCon presentation that is mentioned! Thanks for the link. Irmen -- https://mail.python.org/mailman/listinf

Re: Running Python from the source repo

2016-08-08 Thread Zachary Ware
On Sun, Aug 7, 2016 at 9:11 PM, Steven D'Aprano wrote: > I have cloned the Python source repo, and build CPython, as described here: > > https://docs.python.org/devguide/ > > > Now a little bit later, I want to update the repo, so I run: > > hg fetch According to the hg docs [1], you should proba

Re: Make sure you removed all debugging print statements error

2016-08-08 Thread Michael Torrie
On 08/08/2016 06:20 AM, aaryanrevi...@gmail.com wrote: > Hello guys! I was answering a question on a piece of homework of > mine. Sadly I can't answer it correctly due to the repetitive error > being "Make sure you removed all debugging print statements." > Hopefully one of you guys can help me sol

Re: Make sure you removed all debugging print statements error

2016-08-08 Thread Chris Angelico
On Mon, Aug 8, 2016 at 10:20 PM, wrote: > class Person(object): > def __init__(self, name): > self.name = name > try: > firstBlank = name.rindex(' ') > self.lastName = name[firstBlank+1:] > except: > self.lastName = name > se

Re: api-ms-win-crt-runtime-l1-1-0.dll missing ?

2016-08-08 Thread eryk sun
On Sun, Aug 7, 2016 at 8:40 AM, zutix via Python-list wrote: > I installed the version for windows 64. After a succesfull installation, the > same system error occurs on the lounch of the program: > api-ms-win-crt-runtime-l1-1-0.dll is missing. > > Please would you let me know where I can get sa

Re: Python and 64bit Windows7

2016-08-08 Thread James Santiago
Hello: Thank you for your reply. Here are the steps I took, and the error messages I get: I have a windows7 laptop with 64bit intel i3. 25Gb hard-drive space left, 5Gb usable RAM space. (at the time of installing Python) 1) on the first attempt I chose the default choice in installer. Installa

Network protocols, sans I/O,(Hopefully) the future of network protocols in Python

2016-08-08 Thread Mark Lawrence via Python-list
This may be of interest to some of you http://www.snarky.ca/network-protocols-sans-i-o -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Make sure you removed all debugging print statements error

2016-08-08 Thread Christian Gollwitzer
Am 08.08.16 um 14:20 schrieb aaryanrevi...@gmail.com:> Hello guys! I was answering a question on a piece of homework of mine. Sadly I can't answer it correctly due to the repetitive error being "Make sure you removed all debugging print statements." Hopefully one of you guys can help me solve th

A bioinformatics module similar to DEseq in R

2016-08-08 Thread nir . yakovi1
Hi! is there a Python module equivalent\as similar as possible to 'DEseq' in R? It's just that my team's (many) scripts use it, and to start modifying them all to support some different bioinformatics module would be a nightmare. Thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: Make sure you removed all debugging print statements error

2016-08-08 Thread Steven D'Aprano
On Mon, 8 Aug 2016 10:20 pm, aaryanrevi...@gmail.com wrote: > Hello guys! I was answering a question on a piece of homework of mine. > Sadly I can't answer it correctly due to the repetitive error being "Make > sure you removed all debugging print statements." Hopefully one of you > guys can help

Re: Cant download python libraries.

2016-08-08 Thread Steven D'Aprano
On Mon, 8 Aug 2016 04:37 am, Panayiotis Mangafas wrote: > So i've downloaded python on a new laptop(Windows) and apparently i > downloaded it in a wrong folder and now when i try to install a library i > cant. I have tried both pip install and install setup.py but i cant make > it work. It doesn't

Make sure you removed all debugging print statements error

2016-08-08 Thread aaryanreviews
Hello guys! I was answering a question on a piece of homework of mine. Sadly I can't answer it correctly due to the repetitive error being "Make sure you removed all debugging print statements." Hopefully one of you guys can help me solve this and also make me understand why I keep on getting th

RE: Python and 64bit Windows7

2016-08-08 Thread Joaquin Alzola
>I am having problems when installing Python on a 64bit windows7 laptop. >I am guessing that the problem is happening because of the 64bit architecture. >Could you please take a look at the attached file that has screen shots of the >problem I am facing? >Could you tell me how I can fix these issu

Re: Python and 64bit Windows7

2016-08-08 Thread Chris Angelico
On Sun, Aug 7, 2016 at 9:23 AM, James Santiago wrote: > Could you please take a look at the attached file that has screen shots of > the problem I am facing? No, because this is a text-only mailing list - your attachment got stripped. Can you transcribe the text of the error(s), please? ChrisA -

api-ms-win-crt-runtime-l1-1-0.dll missing ?

2016-08-08 Thread zutix via Python-list
Thank you for your free product PYTHON I'd like to familiarize with, if possible. Environment: Windows 8.1 proc x64 I installed the version from the buton. After a succesfull installation, a system error occurs on the lounch of the program. I desinstalled this version from my

Cant download python libraries.

2016-08-08 Thread Panayiotis Mangafas
So i've downloaded python on a new laptop(Windows) and apparently i downloaded it in a wrong folder and now when i try to install a library i cant. I have tried both pip install and install setup.py but i cant make it work. It doesn't work if i just try to access python from cmd. I've tried to u

Re: Ned Batchelder: Loop Like A Native

2016-08-08 Thread breamoreboy
On Sunday, August 7, 2016 at 2:26:48 AM UTC+1, Ned Batchelder wrote: > On Saturday, August 6, 2016 at 9:21:24 PM UTC-4, Lawrence D’Oliveiro wrote: > > On Sunday, August 7, 2016 at 11:36:06 AM UTC+12, Ned Batchelder wrote: > > > > > Didn't we already do this debate? > > > > I understand. You want

python 3.5.2 lounch: api-ms-win-crt-runtime-l1-1-0.dll is missing ?

2016-08-08 Thread zutix via Python-list
Thank you for your free product PYTHON I'd like to familiarize with, if possible. Environment: Windows 8.1 proc x64 I installed the version from the buton. After a succesfull installation, a system error occurs on the lounch of the program. I desinstalled this version from my

Python and 64bit Windows7

2016-08-08 Thread James Santiago
Hello: I am having problems when installing Python on a 64bit windows7 laptop. I am guessing that the problem is happening because of the 64bit architecture. Could you please take a look at the attached file that has screen shots of the problem I am facing? Could you tell me how I can fix these is

api-ms-win-crt-runtime-l1-1-0.dll missing ?

2016-08-08 Thread zutix via Python-list
I just have subscribed, so I send my message again as required. Sorry for not having pay attention. Thank you for your free product PYTHON I'd like to familiarize with, if possible. Environment: Windows 8.1 proc x64 I installed the version from the buton. After

Re: Python slang

2016-08-08 Thread Marco Sulla
On 6 August 2016 at 23:33, Ian Kelly wrote: > On Aug 6, 2016 2:10 PM, "Marco Sulla via Python-list" < > python-list@python.org> wrote: > > > Yes, I was thinking manly to SQL. That furthermore is NOT a > programming language. > > > Why not? It's claimed to be Turing complete. There's always someth