From: Jock Tanner <tanner.of.kha@gmail.com>
To: Luke Kenneth Casson Leighton <lkcl@lkcl.net>,
Libre-RISCV General Development
<libre-riscv-dev@lists.libre-riscv.org>,
Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
Subject: Re: [libre-riscv-dev] extremely busy crowdsupply update started
Date: Sun, 29 Mar 2020 23:23:10 +1000
Message-ID: <c7dd1af5bd41de5895ad938ec1c0e98caf585ced.camel@gmail.com> (raw)
In-Reply-To: <CAPweEDyxRTJk1bx_eB0mQx29hd6Oh93ANWMOUVz8j39-FPUFaQ@mail.gmail.com>
Luke,
I think this code won't always work as intended:
p = Cfg.getParamInt(attr) # all params have a type
if p.type == 'Enumerate':
Cfg.getParamEnumerate(attr).setInt(val)
else:
Cfg.getParamInt(attr).setInt(val)
If the parameter named 'attr' is already defined, 'p.type' will be set
according to its type. But for undefined parameters 'p.type' will be
what we ask for, i. e. always 'Int'.
BTW I think it is useless to have a distinction between 'Int' and
'Enumerate' types, as well as between 'Double' and 'Percentage'. But
it's another thing.
On Sat, 2020-03-28 at 23:16 +0000, Luke Kenneth Casson Leighton wrote:
> On Sat, Mar 28, 2020 at 4:45 PM Jean-Paul Chaput
> <Jean-Paul.Chaput@lip6.fr> wrote:
> > > 3.2.3. Data types
> > >
> > > Python use duck typing, so you should avoid any direct type
> > > indication
> > > or querying in Python.
> > >
> > > Bad: Cfg.getParamInt('katana.vTracksReservedLocal').setInt(6)
> > >
> > > Good: Cfg['katana.vTracksReservedLocal'] = 6
>
> sorted. jean-paul feel free (after jock's review and highly likely
> automatic reaction to put code-comments in it) to cut/paste the
> Config
> class into coriolis2 somewhere.
>
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
next prev parent reply index
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 21:03 Luke Kenneth Casson Leighton
2020-03-27 5:49 ` Jacob Lifshay
2020-03-27 8:47 ` Luke Kenneth Casson Leighton
2020-03-27 21:31 ` Jacob Lifshay
2020-03-27 21:36 ` Luke Kenneth Casson Leighton
2020-03-31 4:18 ` Jacob Lifshay
2020-03-27 14:39 ` Immanuel, Yehowshua U
2020-03-27 15:49 ` Luke Kenneth Casson Leighton
2020-03-27 16:35 ` Tobias Platen
2020-03-27 19:20 ` Luke Kenneth Casson Leighton
2020-03-27 21:29 ` Jacob Lifshay
2020-03-27 21:32 ` Luke Kenneth Casson Leighton
2020-03-28 11:52 ` Luke Kenneth Casson Leighton
2020-03-27 16:56 ` Michael Nolan
2020-03-27 19:21 ` Luke Kenneth Casson Leighton
2020-03-28 8:09 ` Jock Tanner
2020-03-28 10:02 ` Luke Kenneth Casson Leighton
2020-03-28 16:44 ` Jean-Paul Chaput
2020-03-28 17:13 ` Luke Kenneth Casson Leighton
2020-03-31 8:17 ` Jean-Paul Chaput
2020-03-31 9:31 ` Luke Kenneth Casson Leighton
2020-03-31 9:32 ` Luke Kenneth Casson Leighton
2020-03-31 9:38 ` [libre-riscv-dev] pyobjc, gnu objective-c and gnustep Luke Kenneth Casson Leighton
2020-03-31 11:42 ` lkcl .
2020-03-31 14:11 ` Jean-Paul Chaput
2020-03-31 14:30 ` lkcl .
2020-03-31 16:16 ` Jacob Lifshay
2020-03-28 17:14 ` [libre-riscv-dev] extremely busy crowdsupply update started Luke Kenneth Casson Leighton
2020-03-28 23:16 ` Luke Kenneth Casson Leighton
2020-03-29 13:23 ` Jock Tanner [this message]
2020-03-29 13:46 ` Luke Kenneth Casson Leighton
2020-03-29 10:46 ` Jock Tanner
2020-03-29 11:22 ` Luke Kenneth Casson Leighton
2020-03-29 16:05 ` Immanuel, Yehowshua U
2020-03-29 16:26 ` Luke Kenneth Casson Leighton
2020-03-28 18:07 ` Michael Nolan
2020-03-28 18:33 ` Luke Kenneth Casson Leighton
2020-03-31 11:17 ` Luke Kenneth Casson Leighton
2020-03-29 3:14 ` Immanuel, Yehowshua U
2020-03-29 3:15 ` Immanuel, Yehowshua U
2020-03-31 11:26 ` Luke Kenneth Casson Leighton
2020-03-31 18:09 ` Luke Kenneth Casson Leighton
2020-03-31 18:14 ` Luke Kenneth Casson Leighton
2020-04-01 1:51 ` [libre-riscv-dev] name change announcement on crowdsupply Jacob Lifshay
2020-04-01 1:52 ` Jacob Lifshay
2020-04-01 10:57 ` Luke Kenneth Casson Leighton
2020-04-01 17:31 ` Jacob Lifshay
2020-04-01 17:44 ` Luke Kenneth Casson Leighton
2020-03-31 18:35 ` [libre-riscv-dev] extremely busy crowdsupply update started Cole Poirier
2020-03-31 23:11 ` Cole Poirier
2020-04-01 10:08 ` Luke Kenneth Casson Leighton
2020-04-01 10:54 ` Luke Kenneth Casson Leighton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c7dd1af5bd41de5895ad938ec1c0e98caf585ced.camel@gmail.com \
--to=tanner.of.kha@gmail.com \
--cc=Jean-Paul.Chaput@lip6.fr \
--cc=libre-riscv-dev@lists.libre-riscv.org \
--cc=lkcl@lkcl.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Libre RISC-V Mailing list Archives (accessible via public-inbox)
Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev
Example config snippet for mirrors
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git