Dave Angel Wrote
in message:
> "Clayton Kirkwood" Wrote in message:
>
>
> Second question, why can't a numeric index be
>> used to make assignment to a specific location like a[1] = "some value"? If
>> the mechanism is to use a.index(1,"some value"),
>
> The index() method does not change th
On 22/10/14 19:48, Clayton Kirkwood wrote:
Regarding the index out of range, I know what it meant, I was just kind of
surprised that Python didn't automatically create the node and stuff a value
in.
But what should Python do in this case
aNewList[100] = 42
Should Python create a 1 millio
"Clayton Kirkwood" Wrote in message:
(Somehow, your email program seems to be using the exclamation
point to identify quoted lines, instead of the standard
greater-than symbol. Is that something you can correct, prrhaps
using "settings"?)
>
>
> !-Original Message-
> !From: Tuto
!-Original Message-
!From: Tutor [mailto:tutor-bounces+crk=godblessthe...@python.org] On
!Behalf Of Steven D'Aprano
!Sent: Wednesday, October 22, 2014 4:03 AM
!To: tutor@python.org
!Subject: Re: [Tutor] yet another misunderstanding on my part
!
!On Tue, Oct 21, 2014 at 09:54:49PM
On Tue, Oct 21, 2014 at 09:54:49PM -0700, Clayton Kirkwood wrote:
> col_position, code, description = 0, [], []
> key_name = raw_table.replace('\t','\n')
> for each_line in key_name.splitlines():
> if ':' in each_line:
>code[col_position], description.append() = each_line.split(':')
>
On 22/10/14 05:54, Clayton Kirkwood wrote:
__author__ = 'SYSTEM'
Its best not to invent your own dunder names.
You might run into a problem if a future Python release
decided to use the same name under the covers.
import string
Do you need this? Its very unusual these days
to use the string
__author__ = 'SYSTEM'
import string
#PricingDividends
raw_table = ('''
a: Asky: Dividend Yield
b: Bid d: Dividend per Share
b2: Ask (Realtime) r1: Dividend Pay Date
b3: Bid (Realtime)q: Ex-Dividend Date
p: Previous Close
o: Open
import re,