Thanks to all. I will now try to absorb suggestions and follow up links
- and no doubt get back to you with my next problem!
Owain
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/li
On Fri, Feb 5, 2010 at 12:29 PM, Owain Clarke wrote:
>
>
> Seems to be a bit of a consensus here about dictionaries. Let me just
> restate my reluctance, using examples from Spanish.
>
> esperar = to hope
> esperar = to wait
> tambien = too [i.e. also]
> demasiado = too [i.e. excessive]
>
> So
On Fri, 05 Feb 2010 11:29:30 +
Owain Clarke wrote:
> On Thu, Feb 4, 2010 at 5:43 AM, Owain Clarke wrote:
> >
> >> My question is, that if I proceed like this I will end up with a single
> >> list
> >> of potentially several hundred strings of the form "frword:engword". In
> >> terms of p
On Friday February 5 2010 12:29:30 Owain Clarke wrote:
> What a helpful forum - much thanks to all who've commented. Seems to be
> a bit of a consensus here about dictionaries. Let me just restate my
> reluctance, using examples from Spanish.
>
> esperar = to hope
> esperar = to wait
You could
On Thu, Feb 4, 2010 at 5:43 AM, Owain Clarke wrote:
My question is, that if I proceed like this I will end up with a single list
of potentially several hundred strings of the form "frword:engword". In
terms of performance, is this a reasonable way to do it, or will the program
increasingly sl
On Do, 2010-02-04 at 16:11 +, Owain Clarke wrote:
> Thanks for your input. I had discounted the idea of a dictionary
> because all the keys need to be unique, so whether the key is the
> English or non-English word, it couldn't cope with for example "too",
> or a similar word in the other lang
> Hi,
> ?
> A dictionary (associative array of keys and values) seems a good
> datatype to use. vocab = {} vocab[frenchword]?= englishword
> ?
...
> Cheers!!
> Albert-Jan
Sure, a dict is the obvious choice. For saving into file, if the app is
to be used internally, you can even print it in
On Thu, Feb 4, 2010 at 5:43 AM, Owain Clarke wrote:
> My question is, that if I proceed like this I will end up with a single list
> of potentially several hundred strings of the form "frword:engword". In
> terms of performance, is this a reasonable way to do it, or will the program
> increasingl
On Thu, 04 Feb 2010 16:11:33 +
Owain Clarke wrote:
> But if one word has different meanings in the other language, you may need to
> use a list of words as the values.
?
You can have a more sophisticated structure for you dict. For instance, "love"
is both a noun and a verb, and each has
"Owain Clarke" wrote
I had discounted the idea of a dictionary because all the keys need to be
unique,
Thats true but the values can be lists and do not need to be unique.
Its probably a better starting point that search through a list looking at
every item.
so whether the key is the Engl
On Thu, 04 Feb 2010 16:11:33 +
Owain Clarke wrote:
> But if one word has different meanings in the other language, you may need to
> use a list of words as the values.
?
You can have a more sophisticated structure for you dict. For instance, "love"
is both a noun and a verb, and each has
On Thu, 4 Feb 2010 07:39:29 -0800 (PST)
Albert-Jan Roskam wrote:
> Hi,
>
> A dictionary (associative array of keys and values) seems a good datatype to
> use.
> vocab = {}
> vocab[frenchword] = englishword
>
> For instance:
> >>> vocab = {"aimer": "love"}
> >>> vocab
> {'aimer': 'love'}
> >>
In the face of ambiguity, refuse the temptation to guess.
~~~~~~
--- On Thu, 2/4/10, Owain Clarke
wrote:
From: Owain Clarke
Subject: [Tutor] language aid
To: tutor@python.org
Date: Thursday, February 4, 201
ove
parler - speak
But if one word has different meanings in the other language, you may need to
use a list of words as the values.
Cheers!!
Albert-Jan
~~
In the face of ambiguity, refuse the temptation to guess.
~~~~~~
--- On Th
Hello, all.
I am a newcomer to Python, and I know that I have much learning to do
before I implement my idea, but I am working on the beginnings of a
vocabulary building program. This is how I am catching new words at the
moment.
def newVocab(x,y):
"""
Add new word pair, English word second.
15 matches
Mail list logo