[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave and Database connectivity
From: |
Sergei Steshenko |
Subject: |
Re: Octave and Database connectivity |
Date: |
Sun, 23 Sep 2012 11:30:54 -0700 (PDT) |
----- Original Message -----
> From: Jordi Gutiérrez Hermoso <address@hidden>
> To: Sergei Steshenko <address@hidden>
> Cc: fork <address@hidden>; "address@hidden" <address@hidden>
> Sent: Sunday, September 23, 2012 6:15 PM
> Subject: Re: Octave and Database connectivity
>
> On 22 September 2012 07:01, Sergei Steshenko <address@hidden> wrote:
>> But isn't Octave's struct an equivalent of Python's dict
> functionality ?
>
> Sort of. You can only use strings as keys in a struct. You can use any
> hashable type in Python as keys.
>
>> See also my code in "struct weirdness" thread.
>
> See my explanation for why you misunderstand struct arrays in that thread.
>
> - Jordi G. H.
>
"You can only use strings as keys in a struct" - good enough for me. Even
though, say, Perl calls by default some kind of internal 'to_string' function
when a variable is used as a hash key, I'd rather write and call the needed
'to_string' myself.
Because, for example, I do not want to rely blindly on how, say, floating point
number is converted into string.
I actually thought of adding a check that keys are strings in my code, and
error out if they are not.
For example, how one should treat '1' (a number, not a string) as a key ? As an
integer key ? As unsigned integer key ? As floating point key ? If the latter -
as single, double or quad precision ? By the way, the precision question apples
to integers to.
...
Jordi, you might need to reconsider your misunderstandings of my
misunderstandings.
Regards,
Sergei.
- Re: Octave and Database connectivity, (continued)
- Re: Octave and Database connectivity, Philip Nienhuis, 2012/09/12
- Re: Octave and Database connectivity, Jordi Gutiérrez Hermoso, 2012/09/12
- Re: Octave and Database connectivity, Philip Nienhuis, 2012/09/12
- Re: Octave and Database connectivity, fork, 2012/09/21
- Re: Octave and Database connectivity, Sergei Steshenko, 2012/09/22
- Re: Octave and Database connectivity, Juan Pablo Carbajal, 2012/09/22
- Re: Octave and Database connectivity, Jordi Gutiérrez Hermoso, 2012/09/23
- Re: Octave and Database connectivity,
Sergei Steshenko <=
- Re: Octave and Database connectivity, fork, 2012/09/24
- Re: Octave and Database connectivity, Jordi Gutiérrez Hermoso, 2012/09/24
- Re: Octave and Database connectivity, fork, 2012/09/24
- Re: Octave and Database connectivity, Jordi Gutiérrez Hermoso, 2012/09/24
- Re: Octave and Database connectivity, fork, 2012/09/24
Re: Octave and Database connectivity, richard, 2012/09/12