Post Reply 
List indexing problems
10-02-2016, 07:38 AM
Post: #4
RE: List indexing problems
(10-01-2016 09:29 PM)TravisE Wrote:  Thanks! MAKELIST appears to work in this situation (even though the syntax isn't quite as concise, but better than having to build a list from scratch via an ugly FOR loop).

It did appear that implied multiplication was a problem. And IMO, it seems like implied multiplication on the Prime is a bit too aggressive and keeps sticking its nose in where it isn't wanted. It's really frustrating to keep unexpectedly running into what feels like arbitrary rules and restrictions in the parser and then having to waste time attempting to code around them, instead of simply being able to concentrate on the application I'm trying to write.

As a programmer, I am used to typing in the * whenever needed, and would be happy to turn off implicit multiplication. But if that were a configuration option (because I know many people like it) I would then expect {1, 2,3}2 to fail to compile because of the missing *. Having to type in {1,2,3}*2 would avoid it being mistaken for a list index.
To have {1, 2,3}2 sometimes read as a list index and sometimes as a multiply depending on a configuration setting would be just too confusing.

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
List indexing problems - TravisE - 10-01-2016, 05:16 AM
RE: List indexing problems - TravisE - 10-01-2016, 09:29 PM
RE: List indexing problems - StephenG1CMZ - 10-02-2016 07:38 AM
RE: List indexing problems - TravisE - 10-02-2016, 07:32 PM



User(s) browsing this thread: 1 Guest(s)