Re: New to Python - block grouping (spaces)

2015-04-24 Thread Rustom Mody
On Friday, April 17, 2015 at 10:36:13 PM UTC+5:30, BartC wrote: > (Actually *I* would quite like to know why languages don't have > switchable syntax anyway to allow for people's personal preferences.) Some rambly ruminations on switchable (aka firstclass) syntax http://blog.languager.org/2015/04

Re: Boolean Operator Confusion

2015-04-24 Thread Rustom Mody
On Saturday, April 25, 2015 at 6:52:53 AM UTC+5:30, Mark Lawrence wrote: > On 25/04/2015 01:51, Terry Reedy wrote: > > > > Based on my experience reading newbie posts on python list and > > Stackoverflow, learning to write real functions, without input and > > print, and repeatable tests, is the mo

Re: Enterprise Python

2015-04-24 Thread Rustom Mody
On Saturday, April 25, 2015 at 7:58:55 AM UTC+5:30, Terry Reedy wrote: > Someone, (Mark, I believe), posted this link to a podcast from a few > weeks ago: > http://www.talkpythontome.com/episodes/show/4/enterprise-python-and-large-scale-projects > > A large part of that is based on this Dec 2014

Re: Enterprise Python

2015-04-24 Thread Paul Rubin
Terry Reedy writes: > Here is something I had not read before: "Bank of America actually has > over 5,000 Python developers, with over 10 million lines of Python in > one project alone. JP Morgan underwent a similar transformation." They should follow this guy: https://twitter.com/HaskellCEO --

Enterprise Python

2015-04-24 Thread Terry Reedy
Someone, (Mark, I believe), posted this link to a podcast from a few weeks ago: http://www.talkpythontome.com/episodes/show/4/enterprise-python-and-large-scale-projects A large part of that is based on this Dec 2014 post: https://www.paypal-engineering.com/2014/12/10/10-myths-of-enterprise-pytho

Re: Boolean Operator Confusion

2015-04-24 Thread Mark Lawrence
On 25/04/2015 01:51, Terry Reedy wrote: Based on my experience reading newbie posts on python list and Stackoverflow, learning to write real functions, without input and print, and repeatable tests, is the most important thing many people are not learning from programming books and classes. G

Re: Boolean Operator Confusion

2015-04-24 Thread Rustom Mody
On Saturday, April 25, 2015 at 6:21:56 AM UTC+5:30, Terry Reedy wrote: > Functions that do real calculation should be written as functions that > take an input object (or objects) and produce an output object. > Based on my experience reading newbie posts on python list and > Stackoverflow, l

Re: Boolean Operator Confusion

2015-04-24 Thread Terry Reedy
On 4/24/2015 10:50 AM, subhabrata.bane...@gmail.com wrote: Dear Group, I am trying to understand the use of Boolean operator in Python. I am trying to write small piece of script, as follows, def input_test(): str1=raw_input("PRINT QUERY:") if "AND" or "OR" or "NOT" in str1:

Re: Urjent Requirements :1.Agile Coach, 2.Technical Analyst :- Remedy 3.Technical Analyst :- Internet Explorer, Location:-Bloomington, IL.

2015-04-24 Thread David H. Lipman
From: "Chris Angelico" Please don't spam this list with job ads that have nothing whatsoever to do with Python. Go earn your agency fees actually doing some work, instead of just spamming mailing lists/newsgroups in bulk. ChrisA www.intsystech.com File a complaint for spamming; ab...@1and1

Re: Panda data read_csv returns 'TextFileReader' object

2015-04-24 Thread Dave Angel
On 04/24/2015 04:04 PM, Kurt wrote: Isn't the call pd.read_csv(filepath,...) suppose to return a dataframe, not this other object? I keep getting the following error when I try to view the attribute head. AttributeError: 'TextFileReader' object has no attribute 'head' I reference pandas as pd

Panda data read_csv returns 'TextFileReader' object

2015-04-24 Thread Kurt
Isn't the call pd.read_csv(filepath,...) suppose to return a dataframe, not this other object? I keep getting the following error when I try to view the attribute head. AttributeError: 'TextFileReader' object has no attribute 'head' I reference pandas as pd and df is suppose to define itself. I

Re: Boolean Operator Confusion

2015-04-24 Thread Tim Chase
On 2015-04-24 09:00, Ian Kelly wrote: > It is not equivalent to: > > if ("AND" in str1) or ("OR" in str1) or ("NOT" in str1): Which python allows you to write nicely as if any(term in str1 for term in ["AND", "OR", "NOT"]): The use of any()/all() has certainly improved the readability of

Re: Boolean Operator Confusion

2015-04-24 Thread subhabrata . banerji
On Friday, April 24, 2015 at 8:45:04 PM UTC+5:30, Steven D'Aprano wrote: > On Sat, 25 Apr 2015 12:50 am,wrote: > > > Dear Group, > > > > I am trying to understand the use of Boolean operator in Python. I am > > trying to write small piece of script, as follows, > > > > def input_test(): > >

Re: can you help guys?

2015-04-24 Thread brokolists
i fixed the problem . ty for helps btw. the problem was after i started using Decimal was i was cheking the outputs based on their lenght and when you type getcontext().prec=20 ; it returns allmost every mathematical output based on 20 digits eventhough when they are not neccessary like 20.0

Re: Boolean Operator Confusion

2015-04-24 Thread Steven D'Aprano
On Sat, 25 Apr 2015 12:50 am, subhabrata.bane...@gmail.com wrote: > Dear Group, > > I am trying to understand the use of Boolean operator in Python. I am > trying to write small piece of script, as follows, > > def input_test(): > str1=raw_input("PRINT QUERY:") > if "AND" or "OR" or "NOT

Re: Boolean Operator Confusion

2015-04-24 Thread Ian Kelly
On Fri, Apr 24, 2015 at 8:50 AM, wrote: > Dear Group, > > I am trying to understand the use of Boolean operator in Python. I am trying > to > write small piece of script, as follows, > > def input_test(): > str1=raw_input("PRINT QUERY:") > if "AND" or "OR" or "NOT" in str1: This

Boolean Operator Confusion

2015-04-24 Thread subhabrata . banerji
Dear Group, I am trying to understand the use of Boolean operator in Python. I am trying to write small piece of script, as follows, def input_test(): str1=raw_input("PRINT QUERY:") if "AND" or "OR" or "NOT" in str1: print "It is a Boolean Query" elif "AND

Re: date from day (count) of year

2015-04-24 Thread Vincent Davis
On Fri, Apr 24, 2015 at 8:01 AM, Ian Kelly wrote: > >>> dt.date(2014, 1, 1) + dt.timedelta(114 - 1) > datetime.date(2014, 4, 24) > ​Thanks!​ Vincent Davis -- https://mail.python.org/mailman/listinfo/python-list

Re: New to Python - block grouping (spaces)

2015-04-24 Thread Michael Torrie
On 04/24/2015 01:31 AM, Mark Lawrence wrote: > On 16/04/2015 15:52, Blake McBride wrote: >> So, Python may be a cute language for you to use as an individual, but it >> is unwieldy in a real development environment. >> > > First paragraph from > http://www.talkpythontome.com/episodes/show/4/ent

Re: date from day (count) of year

2015-04-24 Thread Ian Kelly
On Apr 24, 2015 7:45 AM, "Vincent Davis" wrote: > > How does one get the date given the day of a year. > > >>> dt.datetime.now().timetuple().tm_yday > > 114 > > How would I get the Date of the 114 day of 2014? You could use a timedelta: >>> dt.date(2014, 1, 1) + dt.timedelta(114 - 1) datetime.da

date from day (count) of year

2015-04-24 Thread Vincent Davis
How does one get the date given the day of a year. >>> dt.datetime.now().timetuple().tm_yday 114 How would I get the Date of the 114 day of 2014? Vincent Davis -- https://mail.python.org/mailman/listinfo/python-list

aiohttp vs requests: async failures

2015-04-24 Thread Tim
hi, I posted this on stackoverflow but got no comment or answer. Any suggestion on what's going on, or how I can make this a better question? http://stackoverflow.com/questions/29827642/asynchronous-aiohttp-requests-fails-but-synchronous-requests-succeed With the following code I get "Cannot con

Re: want to learn python

2015-04-24 Thread Tom P
On 04/21/2015 12:57 PM, pm05...@gmail.com wrote: Hello everyone, I am willing to learn Python from scratch.Please he me to learn.Although I hv knowledge of c and object oriented programming. Apart from the various tutorials you might want to look at the on-line courses offered by Coursera a

Re: Diff between object graphs?

2015-04-24 Thread Cem Karan
On Apr 23, 2015, at 11:05 AM, Steve Smaldone wrote: > On Thu, Apr 23, 2015 at 6:34 AM, Cem Karan wrote: > > On Apr 23, 2015, at 1:59 AM, Steven D'Aprano > wrote: > > > On Thursday 23 April 2015 11:53, Cem Karan wrote: > > > >> Precisely. In order to make my simulations more realistic, I us

Re: can you help guys?

2015-04-24 Thread Dave Angel
On 04/24/2015 04:29 AM, brokolists wrote: 24 Nisan 2015 Cuma 02:20:12 UTC+3 tarihinde Steven D'Aprano yazdı: On Fri, 24 Apr 2015 01:51 am, brokolists wrote: my problem is i m working with very long float numbers and i use numberx =float(( input( 'enter the number\n '))) after i use this comman

Re: can you help guys?

2015-04-24 Thread brokolists
24 Nisan 2015 Cuma 02:20:12 UTC+3 tarihinde Steven D'Aprano yazdı: > On Fri, 24 Apr 2015 01:51 am, brokolists wrote: > > > my problem is i m working with very long float numbers and i use > > numberx =float(( input( 'enter the number\n '))) > > after i use this command when i enter something more

Re: New to Python - block grouping (spaces)

2015-04-24 Thread Mark Lawrence
On 16/04/2015 15:52, Blake McBride wrote: So, Python may be a cute language for you to use as an individual, but it is unwieldy in a real development environment. First paragraph from http://www.talkpythontome.com/episodes/show/4/enterprise-python-and-large-scale-projects Mahmoud is lead