On Thu, 19 Mar 2020 at 16:46, Peter J. Holzer wrote:
> This is similar to algebraic expressions: Have you ever tried to read a
> mathematical paper from before the time the current notation (which we
> Long, convoluted
> sentences instead of what can now be written as a short formula.
...yes,
On 2020-03-19 15:17, Musbur wrote:
Hello,
either it's me or everybody else who's missing the point. I understand
the OP's proposal like this:
dict[set] == {k: dict[k] for k in set}
list[iterable] == [list[i] for i in iterable]
Am I right?
"Iterable" is too broad because it includes tuples
On 19/03/2020 14:47, Peter J. Holzer wrote:
On 2020-03-19 14:24:35 +, Rhodri James wrote:
On 19/03/2020 13:00, Peter J. Holzer wrote:
It's more compact, especially, if "d" isn't a one-character variable,
but an expression:
fname, lname =
On Fri, Mar 20, 2020 at 2:46 AM Peter J. Holzer wrote:
> > A good language has a small core and extensibility via
> > libraries.
>
> This would actually be a feature of the (standard) library.
I think the line kinda blurs here. This would be a feature of a core
data type, and in CPython, it
For dictionaries it'd even be more useful:
d = {
'first_name': 'Frances',
'last_name': 'Allen',
'email': 'fal...@ibm.com'
}
fname, lname = d[['first_name', 'last_name']]
Why not do this?
import operator
first_last = operator.itemgetter("first_name",
On Fri, Mar 20, 2020 at 2:37 AM Terry Reedy wrote:
>
> On 3/18/2020 10:28 PM, Santiago Basulto wrote:
>
> > For dictionaries it'd even be more useful:
> > d = {
> > 'first_name': 'Frances',
> > 'last_name': 'Allen',
> > 'email': 'fal...@ibm.com'
> > }
> >
On 2020-03-19 08:05:18 -0700, Dan Stromberg wrote:
> On Thu, Mar 19, 2020 at 7:47 AM Peter J. Holzer wrote:
> > On 2020-03-19 14:24:35 +, Rhodri James wrote:
> > > On 19/03/2020 13:00, Peter J. Holzer wrote:
> > > > It's more compact, especially, if "d" isn't a one-character variable,
> > > >
On 03/19/2020 02:09 AM, Terry Reedy wrote:
On 3/18/2020 10:28 PM, Santiago Basulto wrote:
For dictionaries it'd even be more useful:
d = {
'first_name': 'Frances',
'last_name': 'Allen',
'email': 'fal...@ibm.com'
}
fname, lname = d[['first_name',
On 3/18/2020 10:28 PM, Santiago Basulto wrote:
For dictionaries it'd even be more useful:
d = {
'first_name': 'Frances',
'last_name': 'Allen',
'email': 'fal...@ibm.com'
}
fname, lname = d[['first_name', 'last_name']]
Insert ordered dicts make this
Hello,
either it's me or everybody else who's missing the point. I understand
the OP's proposal like this:
dict[set] == {k: dict[k] for k in set}
list[iterable] == [list[i] for i in iterable]
Am I right?
--
https://mail.python.org/mailman/listinfo/python-list
Santiago Basulto writes:
> Hello community. I have an idea to share with the list to see what you all
> think about it.
>
> I happen to use both Python for Data Science (with our regular friends
> NumPy and Pandas) as well as for scripting and backend development. Every
> time I'm working in
On Thu, Mar 19, 2020 at 7:47 AM Peter J. Holzer wrote:
> On 2020-03-19 14:24:35 +, Rhodri James wrote:
> > On 19/03/2020 13:00, Peter J. Holzer wrote:
> > > It's more compact, especially, if "d" isn't a one-character variable,
> > > but an expression:
> > >
> > > fname, lname =
>
On 2020-03-19 14:24:35 +, Rhodri James wrote:
> On 19/03/2020 13:00, Peter J. Holzer wrote:
> > It's more compact, especially, if "d" isn't a one-character variable,
> > but an expression:
> >
> > fname, lname = db[people].employee.object.get(pk=1234)[['first_name',
> > 'last_name']]
>
On 19/03/2020 13:00, Peter J. Holzer wrote:
On 2020-03-19 18:22:34 +1300, DL Neil via Python-list wrote:
On 19/03/20 3:28 PM, Santiago Basulto wrote:
myself missing A LOT features from NumPy, like fancy indexing or
boolean arrays.
So, has it ever been considered to bake into Python's builtin
On 2020-03-19 18:22:34 +1300, DL Neil via Python-list wrote:
> On 19/03/20 3:28 PM, Santiago Basulto wrote:
> > myself missing A LOT features from NumPy, like fancy indexing or
> > boolean arrays.
> > So, has it ever been considered to bake into Python's builtin list and
> > dictionary types
On 19/03/20 3:28 PM, Santiago Basulto wrote:
...> myself missing A LOT features from NumPy, like fancy indexing or
boolean
arrays.
So, has it ever been considered to bake into Python's builtin list and
dictionary types functionality inspired by NumPy? I think multi indexing
alone would be huge
16 matches
Mail list logo