I'm new to Python and OOP.
Python en 2.7.14 Documentation The Python Language Reference
3. Data model
3.1. Objects, values and types
An object's type is also unchangeable. [1]
[1] It is possible in some cases to change an object's type,
under certain controlled conditions.
It appears to
On Sun, May 13, 2018 at 07:10:11PM -0400, Richard Damon wrote:
> On 5/13/18 4:02 PM, Mike McClain wrote:
> > I'm new to Python and OOP.
> > Python en 2.7.14 Documentation The Python Language Reference
> > 3. Data model
> > 3.1. Objects, values and types
> >
Initially I got my quotes from a broker daily to plug into a
spreadsheet, Then I found Yahoo and wrote a perl script to grab them.
When Yahoo quit supplying quotes I found AlphaVantage.co and rewrote
the perl script.
AlphaVantage.co has been down since last week and I found
iextrading.com h
For Friedrich's, Peter's and the many other responses, many thanks.
I will get a handle on python eventually and the many teachers on this
list are making that easier.
Mike
--
"There are three kinds of men. The ones who learn by reading. The
few who learn by observation. The rest of them have to p
On Wed, May 16, 2018 at 02:33:23PM +0200, Friedrich Rentsch wrote:
>
> I didn't know the site you mention. I've been getting quotes from
> Yahoo daily. The service they discontinued was for up to 50 symbols
> per page. I now parse a separate page of some 500K of html for each
> symbol! This site i
On Thu, May 17, 2018 at 07:28:44PM +1000, Chris Angelico wrote:
> On Thu, May 17, 2018 at 7:16 PM, Anders Wegge Keller wrote:
> > P?? Wed, 16 May 2018 14:48:27 +0100
> > Paul Moore skrev:
> >
> >> C++ called that an "rvalue". And then went on to define things that
> >> could go on the left hand s
Let's say I want something that does most or all of foo's
functionality plus a little more and maybe tweek some of foo's
output, so I write a wrapper around foo and call it bar.
If inside bar are the call to foo, as well as methods baz(),
buz() and bug() that make their magic and bar ends up pe
On Sat, May 19, 2018 at 08:22:59AM +0200, dieter wrote:
> Mike McClain writes:
>
> An "object", in general, is something that can have attributes
> (holding the object state) and methods (defining often operations on
> the object state but in some cases also general ope
On Sat, May 19, 2018 at 07:22:28AM +, Steven D'Aprano wrote:
> On Fri, 18 May 2018 18:31:16 -0700, Mike McClain wrote:
>
> I *think* you are describing something like this:
Real close!
> def foo(x):
> return x + 1
>
> def bar(arg):
> a = baz(arg) # do so
On Mon, May 21, 2018 at 09:11:02AM +0200, dieter wrote:
< lots if good info snipped >
Hi dieter,
I'm still working my way through the info you posted
and making sense of it (mostly)
but didn't want to wait any longer to say 'Thanks.'
Thanks,
Mike
--
Even duct tape can't fix stupid ... But it
In their discussion of 'List replication operator'
Steven D'Aprano and Ben Finney used these '_' and '__'.
Steve said, "[[] for _ in range(5)]".
Ben said, "[ [] for __ in range(5) ]".
These aren't listed separately in the index, where might I find
written discussion of these?
Thanks,
Mike
To the many who responded, many thanks.
I,too, found Nick Coghlan's answer iluminating.
Mike
--
There are always gossips everywhere you go and few of them
limit themselves to veracity when what they consider a good
story is available to keep their audience entertained.
- MM
--
https://mail
I'm having understanding the use if the ellipsis.
I keep reading that it is used in slices but every time I use it I get
'Syntax error' in 2.7 if 'Type error' in 3.2.
In python2.7:
l=range(15)
l[...:11]
Syntax error
l[3:...]
Syntax error
l[3:...:11]
Syntax error
In python3.2 it becomes 'Type
OK so I installed python 3.2, which is the latest available as a
package in Debian Wheezy, because I've seen so many folks say it's a
waste of time to play with Py2.7.
Immediately my python playground 'my.python.py' failed as soon as
I changes the '#!' line to python3.2.
Most of the err
On Thu, May 31, 2018 at 11:00:13PM -0400, Terry Reedy wrote:
> On 5/31/2018 10:26 PM, Mike McClain wrote:
> > I'm having understanding the use if the ellipsis.
> >I keep reading that it is used in slices
>
> By numpy for numpy multidimensional arrays, which have thei
On Thu, May 31, 2018 at 07:44:35PM -0700, Mike McClain wrote:
> Is there a way in a script to know which version of python is being
> run so I can write:
> If (version == 2.7):
> do it this way
> elsif (version == 3.2):
> do it another way
>
Thanks fo
On Fri, Jun 01, 2018 at 08:02:27AM -0700, Mike McClain wrote:
> On Thu, May 31, 2018 at 07:44:35PM -0700, Mike McClain wrote:
>
> > Is there a way in a script to know which version of python is being
> > run so I can write:
> > If (version == 2.7):
> >
17 matches
Mail list logo