Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-08 Thread bob gailer
Data = [    ['2019-01-19','Fred Flintstone',23], ['2019-02-01','Scooby doo', 99] ] Warning 3: age is not a fundamental attribute; it is a computed value! -- Bob Gailer ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription opti

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-08 Thread David L Neil
On 8/07/19 10:54 AM, Alan Gauld via Tutor wrote: On 07/07/2019 20:54, David L Neil wrote: (However, some of us grew-up at a time when RAM was expensive and even in our relaxed state, such 'costs' still impinge on our consciousness - Indeed, my first computer was at the local university and ha

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-07 Thread Alan Gauld via Tutor
On 07/07/2019 20:54, David L Neil wrote: > (However, some of us grew-up at a time when RAM was expensive and even > in our relaxed state, such 'costs' still impinge on our consciousness - Indeed, my first computer was at the local university and had 64KB. My second computer was a Sinclair ZX81

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-07 Thread David L Neil
On 8/07/19 2:48 AM, Alan Gauld via Tutor wrote: On 07/07/2019 09:19, David L Neil wrote: First-off, it has to be said that "100's of elements" suggests using an RDBMS - particularly if 'age' (eg 23 and 99) is not the only likely selection mechanism. Multiple selection mechanisms might suggest

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-07 Thread Mats Wichmann
On 7/6/19 8:39 PM, mhysnm1...@gmail.com wrote: > Hi all. > > In C, you can use pointers to reference variables, arrays, ETC. In python, I > do not recall anything specifically that refers to such a capability. What I > want to do is: > > I want to create different data structures such as dictiona

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-07 Thread Alan Gauld via Tutor
On 07/07/2019 09:19, David L Neil wrote: > First-off, it has to be said that "100's of elements" suggests using an > RDBMS - particularly if 'age' (eg 23 and 99) is not the only likely > selection mechanism. Multiple selection mechanisms might suggest an RDBMS but hundreds of items is chickenfee

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-07 Thread David L Neil
First-off, it has to be said that "100's of elements" suggests using an RDBMS - particularly if 'age' (eg 23 and 99) is not the only likely selection mechanism. On 7/07/19 2:39 PM, mhysnm1...@gmail.com wrote: Hi all. In C, you can use pointers to reference variables, arrays, ETC. In python, I

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-07 Thread Alan Gauld via Tutor
On 07/07/2019 03:39, mhysnm1...@gmail.com wrote: > In C, you can use pointers to reference variables, arrays, ETC. In python, I > do not recall anything specifically that refers to such a capability. In Python a variable is a name that refers to an object. Many names can refer to the same object.

Re: [Tutor] Pointers in python ??

2008-01-20 Thread Alan Gauld
"Michael H. Goldwasser" <[EMAIL PROTECTED]> wrote >>It does have the concept of C++ references however and in fact >>thats how Pyhon variables work. They are all references. > However I strongly disagree with your suggestion that Python's > variables work like C++ reference variables. Yo

Re: [Tutor] Pointers in python ??

2008-01-20 Thread Michael H. Goldwasser
On Sunday January 20, 2008, Alan Gauld wrote: >"Varsha Purohit" <[EMAIL PROTECTED]> wrote > >>Does python has concept of pointers like c/cpp ?? If yes >> how.. can >> anyone give me a small example to how we can use pointers in python. > >No, not really. >

Re: [Tutor] pointers

2006-01-11 Thread Danny Yoo
On Wed, 11 Jan 2006, Burge Kurt wrote: > I f I want to translate C code to Python and have a function like > > void get_args(int argc, char* argv[], Argument* args) > { Hi Burge, Also wanted to note that the Standard Library already contains an argument-parsing library, so you may want to tak

Re: [Tutor] pointers

2006-01-11 Thread w chun
On 1/11/06, Kent Johnson <[EMAIL PROTECTED]> wrote: > Burge Kurt wrote: > > > > void get_args(int argc, char* argv[], Argument* args) > > > > My first question about the pointers here; how can I convert them to > > Python? > > Python doesn't have pointers in the sense of direct references to > memo

Re: [Tutor] pointers

2006-01-11 Thread Kent Johnson
Burge Kurt wrote: > Sorry for the previous message I did it by mistake.. > the function was like below: > > void get_args(int argc, char* argv[], Argument* args) > { > //check the amount of the arguments > if(argc%2 == 0) >{ >printf("Error, incorrect argument numbers : %d\n",a

Re: [Tutor] pointers

2006-01-11 Thread Bernard Lebel
Hi Burge, You can access command line argument via sys.argv: import sys print sys.argv This prints a list of the command line arguments. Since argv is a list, it means you can check its length to get the argument count: print len( sys.argv ) There is always at least one argument in this list,

Re: [Tutor] pointers

2006-01-11 Thread Burge Kurt
Sorry for the previous message I did it by mistake..the function was like below:   void get_args(int argc, char* argv[], Argument* args){    //check the amount of the arguments    if(argc%2 == 0)    {   printf("Error, incorrect argument numbers : %d\n",argc);       print_help();   exit(1);