On Tue, Dec 30, 2014 at 10:45 AM, Rick Johnson
wrote:
> [ADDENDUM #3]
This reminds me of the transcript of "Still Alive" at the end of Portal.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
[ADDENDUM #3]
I got off on a tangent in that last post, now i intend to re-focus the
discussion.
> OPTION 1: Define the keys as ranges and the values as years.
>
> From the perspective of the mapping, the semantic order is
> inversed. The "range" has no semantical meaning UNLESS it
>
[Addendum #2]
WHO'S RESPONSIBLE FOR THE "SEMANTIC WARS"?
I've always believed in the philosophy of:
"Responsibility to the responsible".
After reading that statement,
On Monday, December 29, 2014 12:27:33 PM UTC-6, Rick Johnson wrote:
>
> [...]
>
[Addendum]
WHEN LOGICAL AND SUBJECTIVE CONSTRUCTS INTERSECT,
"SEMANTIC WARS" ARE WAGED!
I be
On Monday, December 29, 2014 10:58:59 AM UTC-6, Vincent Davis wrote:
> Rick, Thanks for your suggestions, I was just starting
> version2 and wanted to do something like you suggest.
> Another question. I what to change the logic so that
> rather than return THE match it return all matches. I want
On Sun, Dec 28, 2014 at 11:50 PM, Rick Johnson wrote:
> 3. I see that you are utilizing regexps to aid in the logic,
> and although i agree that regexps are overkill for this
> problem (since it could "technically" be solved with string
> methods) if *I* had to solve this problem, i would use the
On Mon, Dec 29, 2014 at 7:47 AM, Denis McMahon
wrote:
> K .. D would be the appropriate month prefixes for the 1981 model year,
> but if both the 1981 and 1982 model years used DA as a year prefix, there
> would be some prefixes that appeared twice, in the 1981 model year and
> the 1982 model yea
On Sun, 28 Dec 2014 16:27:20 -0700, Vincent Davis wrote:
> On Fri, Dec 26, 2014 at 12:15 PM, Denis McMahon
>
> wrote:
>
>> Note, I think the 1981 model year ran KCA - DCA prefixes, not as shown
>> on the website you quoted.
> Denis,
> Regarding the KCA - DCA prefixes, do you have a source as t
On Monday, December 29, 2014 12:50:39 AM UTC-6, Rick Johnson wrote:
[EDIT]
> 3. Now you can write some fairly simple logic.
>
> prog = re.compile("pat1|pat2|pat3...")
> def parse_vin(vin):
> match = prog.search(vin)
> if match:
> gname = # Fetch the groupname
On Sunday, December 28, 2014 5:34:11 PM UTC-6, Vincent Davis wrote:
>
> [snip: code sample with Unicode spaces! Yes, *UNICODE SPACES*!]
Oh my! Might i offer some suggestions to improve the
readability of this code?
1. Indexing is syntactically noisy, so if you find yourself
fetching the same in
On Fri, Dec 26, 2014 at 12:15 PM, Denis McMahon
wrote:
> Note, I think the 1981 model year ran KCA - DCA prefixes, not as shown on
> the website you quoted.
>
Denis,
Regarding the KCA - DCA prefixes, do you have a source as to why you think
this?
Here is what I have so far with a simple test a
On Thu, 25 Dec 2014 17:02:33 -0700, Vincent Davis wrote:
> I would like to parse the VIN, frame and engine numbers found on this
> page (below).
First of all you need to define the number of different patterns that are
possible:
eg:
H + 3-5 digits -> twins Unit 350cc & 500cc '57 - '69
3 (or m
Vincent Davis writes:
> Any comment on using pyparsing VS regex
A full-blown parser (with ‘pyparsing’) is overkill for this.
Even regular expressions isn't needed.
The built-in text type (‘str’) in Python 3 should have everything you
need; you only need to match prefixes. No need in this task
You're extracting structured data from an html file. You might want to look
at the lxml.etree module. (I think that's where ElementTree landed when it
was adopted into the stdlib).
Skip
--
https://mail.python.org/mailman/listinfo/python-list
On 2014-12-25 19:58, Vincent Davis wrote:
> Any comment on using pyparsing VS regex
If the VIN had any sort of regular grammar (especially if it involved
nesting) then pyparsing would have value.
I defaulted to regexp (1) because it's available out of the box, and
(2) while it might be overkill,
Tim and Ben,
Thanks for your input, I am working on it now and will come back when I
have questions.
Any comment on using pyparsing VS regex
Vincent Davis
720-301-3003
On Thu, Dec 25, 2014 at 7:18 PM, Ben Finney
wrote:
> Vincent Davis writes:
>
> > I don't want to parse the page, I what a func
Vincent Davis writes:
> I don't want to parse the page, I what a function that given a VIN
> (frame or engine number) returns the year the bike was made.
So the page has a collection of tables which the reader can use to
manually look up the VIN, or elements of the VIN, to determine the range
of
On 2014-12-25 17:59, Vincent Davis wrote:
> These are vintage motorcycles so the "VIN's" are not like modern
> VIN's these are frame numbers and engine number.
> I don't want to parse the page, I what a function that given a VIN
> (frame or engine number) returns the year the bike was made.
While
These are vintage motorcycles so the "VIN's" are not like modern VIN's
these are frame numbers and engine number.
I don't want to parse the page, I what a function that given a VIN (frame
or engine number) returns the year the bike was made.
Vincent Davis
720-301-3003
On Thu, Dec 25, 2014 at 5:5
On Thu, Dec 25, 2014 at 4:02 PM, Vincent Davis wrote:
> I would like to parse the VIN, frame and engine numbers found on this page
> (below). I don't really know any regex, I have looked a little at pyparsing.
> I have some other similar numbers to. I am looking for suggestions, which
> "tool" sho
20 matches
Mail list logo