On 2021-09-02 at 20:12:19 -0300,
Michio Suginoo wrote:
> I have the following question regarding how to scrape Google Map to get
> address based on a given list of geocodes.
> Given a list of geocodes (latitude; longitude) of locations, I would like
> to scrape municipalities of all
Dear all,
I have the following question regarding how to scrape Google Map to get
address based on a given list of geocodes.
Given a list of geocodes (latitude; longitude) of locations, I would like
to scrape municipalities of all the spots in the list. How can I do that?
For example, I have
ent from each nested list to add up [1,2,3] = 6. How should it be
corrected? Thx.
>
>> alist = [[1,11,111], [2,22,222], [3,33,333]]
>
>> list(map(add_all_elements,*alist)
>
>
Trylist(map(add_all_elements, alist)) instead.
If you give a map a single list as a sec
ch nested list to add up [1,2,3] = 6. How should
> >>> it be corrected? Thx.
> >>
> >> I see three options. You can
> >>
> >> (1) use a list comprehension
> >>
> >> [add_all_elements(*sub) for sub in alist]
> >>
>
ace map() with itertools.starmap()
list(itertools.starmap(add_all_elements, alist))
(3) change your function's signature from add_all_elements(*args) to
add_all_elements(args), either by modifying it directly or by wrapping it
into another function
list(map(lambda args: add_all_elements(*args
> it be corrected? Thx.
>>
>> I see three options. You can
>>
>> (1) use a list comprehension
>>
>> [add_all_elements(*sub) for sub in alist]
>>
>> (2) replace map() with itertools.starmap()
>>
>> list(itertools.starmap(add_all_elements, alist))
&
with [1,11,111] ==> 1+11+111 = 123. But instead, it appears to take
> > the 1st element from each nested list to add up [1,2,3] = 6. How should
> > it be corrected? Thx.
>
> I see three options. You can
>
> (1) use a list comprehension
>
> [add_all_ele
rom each nested list to add up [1,2,3] = 6. How should
> it be corrected? Thx.
I see three options. You can
(1) use a list comprehension
[add_all_elements(*sub) for sub in alist]
(2) replace map() with itertools.starmap()
list(itertools.starmap(add_all_elements, alist))
(3) change your fu
How should it be
corrected? Thx.
>>> alist = [[1,11,111], [2,22,222], [3,33,333]]
>>> list(map(add_all_elements,*alist))
My args = (1, 2, 3)
i = 1
BEFORE total = 0
AFTER total = 1
i = 2
BEFORE total = 1
AFTER total = 3
i = 3
BEFORE total = 3
AFTER total = 6
FINAL total =
On 21/09/2018 23:29, Viet Nguyen via Python-list wrote:
Hi,
I want to add up all of the list elements. But when I use the "map" function, it didn't
seem to work as I expect. Could someone point out how "map" can be applied here then?
def add_all_elements (*args):
Hi Viet,
map applies the function to each of the elements of the list you provide.
It would be roughly equivalent to:
[add_all_elements(x) for x in alist]
It may help you to consider the term and function "map" from the view of linear
algebra.
Apparently it's a com
Hi,
I want to add up all of the list elements. But when I use the "map" function,
it didn't seem to work as I expect. Could someone point out how "map" can be
applied here then?
def add_all_elements (*args):
total = 0
for i in args:
print(type(i))
I am excecting custom commands like shell on multiple linux hosts. and if in
one host one of the commands fail. I want that process not to proceed. If the
remote command throws an error i am logging it .. but the process goes to next
command . but if i terminate the command, the process will t
On Monday, January 8, 2018 at 1:16:08 PM UTC, jorge@cptec.inpe.br wrote:
> Hi,
>
> Please, I woudl like to plot a map like this figure. How can I do this
> using Python2.7
>
> Thanks,
>
> Conrado
Figures don't get through and you've all ready asked t
Hi,
Please, I woudl like to plot a map like this figure. How can I do this
using Python2.7
Thanks,
Conrado
--
https://mail.python.org/mailman/listinfo/python-list
> On Dec 23, 2017, at 3:27 PM, breamore...@gmail.com wrote:
>
> On Friday, December 22, 2017 at 3:42:58 PM UTC, jorge@cptec.inpe.br wrote:
>> Hi,
>>
>> I use the PYTHON and IDL. In IDL I can plot a grid map like a this
>> figure (mapa.png). Please, I
On Friday, December 22, 2017 at 3:42:58 PM UTC, jorge@cptec.inpe.br wrote:
> Hi,
>
> I use the PYTHON and IDL. In IDL I can plot a grid map like a this
> figure (mapa.png). Please, I would like know how can I plot my figure
> using PYTHON with the box around the figure. L
Hi,
I use the PYTHON and IDL. In IDL I can plot a grid map like a this
figure (mapa.png). Please, I would like know how can I plot my figure
using PYTHON with the box around the figure. Like this that I plot using
the IDL.
Thanks
--
https://mail.python.org/mailman/listinfo/python-list
30.10.17 12:10, Kirill Balunov пише:
Sometime ago I asked this question at SO [1], and among the responses
received was paragraph:
- `zip` re-uses the returned `tuple` if it has a reference count of 1 when
the `__next__` call is made.
- `map` build a new `tuple` that is passed to the mapped
On Mon, 30 Oct 2017 09:10 pm, Kirill Balunov wrote:
> Sometime ago I asked this question at SO [1], and among the responses
> received was paragraph:
>
> - `zip` re-uses the returned `tuple` if it has a reference count of 1 when
> the `__next__` call is made.
> - `map` build
Sometime ago I asked this question at SO [1], and among the responses
received was paragraph:
- `zip` re-uses the returned `tuple` if it has a reference count of 1 when
the `__next__` call is made.
- `map` build a new `tuple` that is passed to the mapped function every
time a `__next__` call is
= map(math.sin, math.pi*t)
If you use np.sin instead of math.sin, you don't have to use map: Most
numpy functions operate elementwise on arrays (for example, you're
multiplying math.pi with an array - something that wouldn't work with a
list).
Here's the numpy way of doing th
On 25/09/17 18:44, john polo wrote:
> Python List,
>
> I am trying to make practice data for plotting purposes. I am using
> Python 3.6. The instructions I have are
>
> import matplotlib.pyplot as plt
> import math
> import numpy as np
> t = np.arange(0, 2.5, 0.1)
>
On 9/25/2017 12:03 PM, Paul Moore wrote:
You're using Python 3, and I suspect that you're working from
instructions that assume Python 2. In Python 3, the result of map() is
a generator, not a list (which is what Python 2's map returned). In
order to get an actual list (which app
You're using Python 3, and I suspect that you're working from
instructions that assume Python 2. In Python 3, the result of map() is
a generator, not a list (which is what Python 2's map returned). In
order to get an actual list (which appears to be what you need for
your plot call
On 2017-09-25, john polo wrote:
> Python List,
>
> I am trying to make practice data for plotting purposes. I am using
> Python 3.6. The instructions I have are
>
> import matplotlib.pyplot as plt
> import math
> import numpy as np
> t = np.arange(0, 2.5, 0.1)
>
john polo wrote:
> Python List,
>
> I am trying to make practice data for plotting purposes. I am using
> Python 3.6. The instructions I have are
>
> import matplotlib.pyplot as plt
> import math
> import numpy as np
> t = np.arange(0, 2.5, 0.1)
> y1 = map(math.s
On 9/25/17 12:44 PM, john polo wrote:
Python List,
I am trying to make practice data for plotting purposes. I am using
Python 3.6. The instructions I have are
import matplotlib.pyplot as plt
import math
import numpy as np
t = np.arange(0, 2.5, 0.1)
y1 = map(math.sin, math.pi*t)
plt.plot(t,y1
On 9/25/2017 12:44 PM, john polo wrote:
Python List,
I am trying to make practice data for plotting purposes. I am using
Python 3.6. The instructions I have are
import matplotlib.pyplot as plt
import math
import numpy as np
t = np.arange(0, 2.5, 0.1)
y1 = map(math.sin, math.pi*t)
Change to
Python List,
I am trying to make practice data for plotting purposes. I am using
Python 3.6. The instructions I have are
import matplotlib.pyplot as plt
import math
import numpy as np
t = np.arange(0, 2.5, 0.1)
y1 = map(math.sin, math.pi*t)
plt.plot(t,y1)
However, at this point, I get a
On Thu, 17 Aug 2017 12:53 am, Steve D'Aprano wrote:
[...]
> Are there language implementations which evaluate the result of map() (or its
> equivalent) in some order other than the obvious left-to-right first-to-last
> sequential order? Is that order guaranteed by the languag
Op 2017-08-16, Steve D'Aprano schreef :
> Are there language implementations which evaluate the result of map()
> (or its equivalent) in some order other than the obvious left-to-right
> first-to-last sequential order? Is that order guaranteed by the
> language, or is it an impl
On Thu, 17 Aug 2017 03:54 pm, Pavol Lisy wrote:
> Is it guaranteed in python? Or future version could implement map with
> something like subscriptability "propagation"?
>
>>>>range(1_000_000_000_000_000_000)[-1]
>
>
>>>> map(
On Thu, Aug 17, 2017 at 3:54 PM, Pavol Lisy wrote:
> On 8/16/17, Steve D'Aprano wrote:
>> Over in another thread, we've been talking about comprehensions and their
>> similarities and differences from the functional map() operation.
>>
>> Reminder:
>&g
On 8/16/17, Steve D'Aprano wrote:
> Over in another thread, we've been talking about comprehensions and their
> similarities and differences from the functional map() operation.
>
> Reminder:
>
> map(chr, [65, 66, 67, 68])
>
> will return ['A',
Steve D'Aprano writes:
> Are there language implementations which evaluate the result of map()
> (or its equivalent) in some order other than the obvious left-to-right
> first-to-last sequential order? Is that order guaranteed by the
> language, or is it an implementation deta
On 8/16/2017 10:53 AM, Steve D'Aprano wrote:
Over in another thread, we've been talking about comprehensions and their
similarities and differences from the functional map() operation.
Reminder:
map(chr, [65, 66, 67, 68])
will return ['A', 'B', 'C'].
T
On Wednesday, August 16, 2017 at 8:24:46 PM UTC+5:30, Steve D'Aprano wrote:
> Over in another thread, we've been talking about comprehensions and their
> similarities and differences from the functional map() operation.
>
> Reminder:
>
> map(chr, [65, 66, 67, 68])
&g
On Thu, 17 Aug 2017 12:53 am, Steve D'Aprano wrote:
> map(chr, [65, 66, 67, 68])
>
> will return ['A', 'B', 'C'].
Of course I meant ['A', 'B', 'C', 'D'].
--
Steve
“Cheer up,” they said, “th
Over in another thread, we've been talking about comprehensions and their
similarities and differences from the functional map() operation.
Reminder:
map(chr, [65, 66, 67, 68])
will return ['A', 'B', 'C'].
My questions for those who know languages apa
Is "two different input map to one unique target called nonlinear case " or
"one unique input map to two different target called nonlinear case"? Which
learning method can train these two cases or no method to train one of case?
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, Nov 6, 2016 at 12:50 AM, Arthur Havlicek
wrote:
> 2016-11-05 12:47 GMT+01:00 Chris Angelico :
>
>> On Sat, Nov 5, 2016 at 9:50 PM, Arthur Havlicek
>>
>> But here's the thing. For everyone who writes a decorator function,
>> there could be dozens who use it.
>>
>
> The day that one guy leav
2016-11-05 12:47 GMT+01:00 Chris Angelico :
> On Sat, Nov 5, 2016 at 9:50 PM, Arthur Havlicek
>
> But here's the thing. For everyone who writes a decorator function,
> there could be dozens who use it.
>
The day that one guy leaves the team, suddenly you have code that's become
a bit tricky to ma
On Sat, Nov 5, 2016 at 9:50 PM, Arthur Havlicek
wrote:
> Pick 10 programmers for hire and count how many know how to write a
> decorator. If you have specified you needed python specialists, you may
> have 3-4. If not, you are lucky to find even one.
By "write a decorator", I presume you mean imp
2016-11-05 9:42 GMT+01:00 Steve D'Aprano :
>
> I don't know who you are quoting there. It is considered impolite to quote
> people without giving attribution, and makes it harder to respond.
>
My bad. I was unaware of that. This was quoted from Ned Batchelder's mali.
2016-11-05 9:42 GMT+01:00 S
ople without giving attribution, and makes it harder to respond. But for
what it's worth, I agree with this person.
In my code, it is quite common for me to map back to the same *variable*,
for example I might write something like this:
def process(alist):
alist = [float(x) for x in al
> I don't think that justifies the claim of "especially
> bad", which to me implies something much worse.
Quicksort has built its popularity by performing better by "a mere factor two"
better than mergesort and heapsort. It became the reference sorting algorithm
even though its worst case comple
(nearly my namesake)
> Okay, I see what you are getting at now: in CPython 3, list comprehensions
> are implemented in such a way that the list comprehension requires a
> minimum of one function call, while list(map(func, iterable))) requires a
> minimum of O(N)+2 function calls: a ca
heek
I'd like to see you run a Python script containing a list comprehension
without opening and closing the .py file.
:-P
Okay, I see what you are getting at now: in CPython 3, list comprehensions
are implemented in such a way that the list comprehension requires a
minimum of one function c
my proposal. If any in-place operation is
"C++ semantics" how do you explain there is already a bunch of in-place
operator stuffed in Python that have even less justification to their
existance than map or filter does such as sort/sorted, reverse/reversed ?
Especially troubling since the o
an iterator.
lst[:] = (item for item in list if predicate(item))
lst[:] = map(f, lst) # iterator in 3.x.
To save memory, stop using unneeded temporary lists and use iterators
instead. If slice assignment is done as I hope it will optimize remain
memory operations. (But I have not read the
arthurhavli...@gmail.com writes:
> I would gladly appreciate your returns on this, regarding:
> 1 - Whether a similar proposition has been made
> 2 - If you find this of any interest at all
> 3 - If you have a suggestion for improving the proposal
Bleccch. Might be ok as a behind-the-scenes optim
On Fri, Nov 4, 2016 at 4:00 AM, Steve D'Aprano
wrote:
> On Fri, 4 Nov 2016 01:05 am, Chris Angelico wrote:
>
>> On Thu, Nov 3, 2016 at 7:29 PM, Steven D'Aprano
>> wrote:
>>>> lst = map (lambda x: x*5, lst)
>>>> lst = filter (lambda x: x%3 =
it easier over time.
Famous example:
When you learned programming, you may have had no idea what "+=" was doing,
but now you do, you probably rate "a += 2" syntax to be much better than "a
= a + 2". You make the economy of a token, but more important, you make
your inten
On Fri, 4 Nov 2016 01:05 am, Chris Angelico wrote:
> On Thu, Nov 3, 2016 at 7:29 PM, Steven D'Aprano
> wrote:
>>> lst = map (lambda x: x*5, lst)
>>> lst = filter (lambda x: x%3 == 1, lst)
>>> And perform especially bad in CPython compared to a comprehen
On 11/3/2016 4:29 AM, Steven D'Aprano wrote:
Nonsense. It is perfectly readable because it is explicit about what is being
done, unlike some magic method that you have to read the docs to understand
what it does.
Agreed.
A list comprehension or for-loop is more general and can be combined so
On Thu, Nov 3, 2016 at 7:29 PM, Steven D'Aprano
wrote:
>> lst = map (lambda x: x*5, lst)
>> lst = filter (lambda x: x%3 == 1, lst)
>> And perform especially bad in CPython compared to a comprehension.
>
> I doubt that.
>
It's entirely possible. A list comp in
fast way to create lists through comprehensions.
Because of their ease of use and efficiency through native implementation, they
are an advantageous alternative to map, filter, and more. However, when used in
replacement for an in-place version of these functions, they are sub-optimal,
and Python
== 1
>
> I think the chances of Guido accepting new syntax for something as trivial as
> this with three existing solutions is absolutely zero.
>
> I think the chances of Guido accepting new list/dict methods for in place map
> and/or filter is a tiny bit higher than zero
On Thursday 03 November 2016 17:56, arthurhavli...@gmail.com wrote:
[...]
> Python features a powerful and fast way to create lists through
> comprehensions. Because of their ease of use and efficiency through native
> implementation, they are an advantageous alternative to map, fi
Sayth Renshaw wrote:
Is there a standard library feature that allows you to define a declarative
map or statement that defines the data and its objects to be parsed and
output format?
Not really.
Just wondering as for loops are good but when i end up 3-4 for loops deep and
want multiple
Is there a standard library feature that allows you to define a declarative map
or statement that defines the data and its objects to be parsed and output
format?
Just wondering as for loops are good but when i end up 3-4 for loops deep and
want multiple matches at each level i am finding it
>
> On Friday, June 10, 2016 at 10:04:09 PM UTC+8, Michael Selik wrote:
> > You'll need to explain the problem in more detail. Instead of talking
> about operators and columns, what is the actual, real-world problem?
On Sat, Jun 11, 2016 at 2:21 AM meInvent bbird wrote:
> there are six operato
> input are these six operators, output is finding full column of 27
> > elements add together is 54
> >
> > i got memory error when searching this,
> >
> > i have difficulty in understanding map reduce and transforming my program
> > into map reduce probl
On Thu, Jun 9, 2016, 9:11 PM Ho Yeung Lee wrote:
> input are these six operators, output is finding full column of 27
> elements add together is 54
>
> i got memory error when searching this,
>
> i have difficulty in understanding map reduce and transforming my program
> in
input are these six operators, output is finding full column of 27 elements add
together is 54
i got memory error when searching this,
i have difficulty in understanding map reduce and transforming my program into
map reduce problem
M1 = {}
M2 = {}
M3 = {}
M4 = {}
M5 = {}
V6 = {}
M1['0
I like using Yelp's mrjob module (https://github.com/Yelp/mrjob) to run
Python on Hadoop.
On Thu, Jun 9, 2016 at 2:56 AM Ho Yeung Lee
wrote:
> [... a bunch of code ...]
If you want to describe a map-reduce problem, start with the data. What
does a record of your input data look lik
i got M1 to M5 and V6 operator
and would like to do a full combination and result will also act among each
other,
map reduce attract my application
how to use this in this example?
actually below is like vlookup
then example is op3(op2(op1(x->y, y->z)), x->z)
search which combinat
On Friday, April 1, 2016 at 1:58:29 PM UTC+5:30, Tim Golden wrote:
>
> For the latter, I take the view that I know where the delete key is (or
> the "ignore thread" button or whatever) and I just skip the thread when
> it shows up.
> Feel free to contact the list owner [python list-owner] if
>
Steven D'Aprano :
> On Fri, 1 Apr 2016 07:27 pm, Tim Golden wrote:
>
>> FWIW I'm broadly with Antoon here: wider-ranging discussions can be
>> interesting and useful.
>
> Sure. But sometimes conversations are going nowhere:
That's why GNUS has the "k" command to wipe out a whole thread.
I know,
On Fri, 1 Apr 2016 07:27 pm, Tim Golden wrote:
> FWIW I'm broadly with Antoon here: wider-ranging discussions can be
> interesting and useful.
Sure. But sometimes conversations are going nowhere:
http://www.youtube.com/watch?v=kQFKtI6gn9Y
http://www.montypython.net/scripts/argument.php
[...]
On 01/04/2016 08:59, Antoon Pardon wrote:
Op 31-03-16 om 16:12 schreef Mark Lawrence via Python-list:
On 31/03/2016 14:27, Random832 wrote:
So can we discuss how a unified method to get a set of all valid
subscripts (and/or subscript-value pairs) on an object would be a useful
thing to have wit
On 01/04/2016 08:59, Antoon Pardon wrote:
> Op 31-03-16 om 16:12 schreef Mark Lawrence via Python-list:
>> On 31/03/2016 14:27, Random832 wrote:
>>> So can we discuss how a unified method to get a set of all valid
>>> subscripts (and/or subscript-value pairs) on an object would be a useful
>>> thin
> On Mar 31, 2016, at 10:02 AM, Marko Rauhamaa wrote:
>
> However, weirdly, dicts have get but lists don't.
Read PEP 463 for discussion on this topic.
https://www.python.org/dev/peps/pep-0463/
--
https://mail.python.org/mailman/listinfo/python-list
Op 31-03-16 om 16:12 schreef Mark Lawrence via Python-list:
> On 31/03/2016 14:27, Random832 wrote:
>> So can we discuss how a unified method to get a set of all valid
>> subscripts (and/or subscript-value pairs) on an object would be a useful
>> thing to have without getting bogged down in theoret
On 3/31/2016 10:13 AM, Marko Rauhamaa wrote:
One could compose a table of correspondences:
with some corrections
---
list (L)dict (D)
---
L[key] = value
Jussi Piitulainen :
> operator.itemgetter(*selector)(fields) # ==> ('y', 'y', 'x')
>
> [...]
>
> operator.itemgetter(*selector)(field_dict) # ==> ('y', 'y', 'x')
>
> It's not quite the same but it's close and it works the same for
> strings, lists, dicts, ...
Not quite the same, but nicely found
Random832 :
> So can we discuss how a unified method to get a set of all valid
> subscripts (and/or subscript-value pairs) on an object would be a
> useful thing to have without getting bogged down in theoretical
> claptrap about the meaning of the mapping contract?
One could compose a table of c
On 31/03/2016 14:27, Random832 wrote:
On Thu, Mar 31, 2016, at 09:17, Mark Lawrence via Python-list wrote:
On 31/03/2016 14:08, Antoon Pardon wrote:
Op 31-03-16 om 13:57 schreef Chris Angelico:
Okay. I'll put a slightly different position: Prove that your proposal
is worth discussing by actual
Chris Angelico :
> Or, even more likely and even more Pythonic:
>
>>>> [fields[i] for i in selector]
> ['y', 'y', 'x']
>
> As soon as you get past the easy and obvious case of an existing
> function, filter and map quickly fall behind co
On Thursday, March 31, 2016 at 6:38:56 PM UTC+5:30, Antoon Pardon wrote:
> Op 31-03-16 om 13:57 schreef Chris Angelico:
> > Okay. I'll put a slightly different position: Prove that your proposal
> > is worth discussing by actually giving us an example that we can
> > discuss. So far, this thread ha
On Thu, Mar 31, 2016, at 09:17, Mark Lawrence via Python-list wrote:
> On 31/03/2016 14:08, Antoon Pardon wrote:
> > Op 31-03-16 om 13:57 schreef Chris Angelico:
> >> Okay. I'll put a slightly different position: Prove that your proposal
> >> is worth discussing by actually giving us an example tha
On 31/03/2016 14:08, Antoon Pardon wrote:
Op 31-03-16 om 13:57 schreef Chris Angelico:
Okay. I'll put a slightly different position: Prove that your proposal
is worth discussing by actually giving us an example that we can
discuss. So far, this thread has had nothing but toy examples (and
bogoex
On 31/03/2016 13:49, Marco Sulla via Python-list wrote:
On 31 March 2016 at 14:30, Mark Lawrence via Python-list
wrote:
Note that dict also supports
__getitem__() and __len__(), but is considered a mapping rather than a
sequence because the lookups use arbitrary immutable keys rather than
inte
On Fri, Apr 1, 2016 at 12:08 AM, Antoon Pardon
wrote:
> Op 31-03-16 om 13:57 schreef Chris Angelico:
>> Okay. I'll put a slightly different position: Prove that your proposal
>> is worth discussing by actually giving us an example that we can
>> discuss. So far, this thread has had nothing but toy
Op 31-03-16 om 13:57 schreef Chris Angelico:
> Okay. I'll put a slightly different position: Prove that your proposal
> is worth discussing by actually giving us an example that we can
> discuss. So far, this thread has had nothing but toy examples (and
> bogoexamples that prove nothing beyond that
if you are talking
> about treating lists as special cases of dicts, I have occasionally
> instinctively wanted something like this:
>
> >>> fields = [ "x", "y", "z" ]
> >>> selector = (1, 1, 0)
> >>> list(map(fields.g
I want also to add that we are focusing on sequences, but my proposal
is also to make map interface more similar, introducing a vdict type
that iterates over values, and this will be for me really more
practical. PEP 234 ( http://legacy.python.org/dev/peps/pep-0234/ )
never convinced me. Van
s an example that we can
>> discuss.
>
> Sorry for missing most of the arguments here, but if you are talking
> about treating lists as special cases of dicts, I have occasionally
> instinctively wanted something like this:
>
> >>> fields = [ "x", &qu
t if you are talking
about treating lists as special cases of dicts, I have occasionally
instinctively wanted something like this:
>>> fields = [ "x", "y", "z" ]
>>> selector = (1, 1, 0)
>>> list(map(fields.get, selector))
T
ram, where it is desirable that adding or
deleting one key will modify the rest of the keys in the mapping.
1. the example was for confuting your assertion that an implementation
of sequences as extended classes of maps violate the map contract.
2. I already linked a real-world example previously.
deleting one key will modify the rest of the keys in the mapping.
1. the example was for confuting your assertion that an implementation
of sequences as extended classes of maps violate the map contract.
2. I already linked a real-world example previously. Google it and you
can find tons of examp
On Thu, Mar 31, 2016 at 10:22 PM, Antoon Pardon
wrote:
> Op 31-03-16 om 12:36 schreef Steven D'Aprano:
>> On Thu, 31 Mar 2016 06:52 pm, Antoon Pardon wrote:
>>
>>> it is your burden to argue that problem.
>> No it isn't. I don't have to do a thing. All I need to do is sit back and
>> wait as this
Op 31-03-16 om 12:36 schreef Steven D'Aprano:
> On Thu, 31 Mar 2016 06:52 pm, Antoon Pardon wrote:
>
>> it is your burden to argue that problem.
> No it isn't. I don't have to do a thing. All I need to do is sit back and
> wait as this discussion peters off into nothing. The burden isn't on me to
>
Op 31-03-16 om 12:36 schreef Steven D'Aprano:
> On Thu, 31 Mar 2016 06:52 pm, Antoon Pardon wrote:
>
>> it is your burden to argue that problem.
> No it isn't. I don't have to do a thing.
If that is how you think about this, why do you contribute? I completly
understand if you are of the opinion t
On Thu, 31 Mar 2016 06:52 pm, Antoon Pardon wrote:
> it is your burden to argue that problem.
No it isn't. I don't have to do a thing. All I need to do is sit back and
wait as this discussion peters off into nothing. The burden isn't on me to
justify the status quo. The burden is on those who wan
Op 31-03-16 om 04:44 schreef Steven D'Aprano:
> On Thu, 31 Mar 2016 03:52 am, Random832 wrote:
>
>> Like, these are common patterns:
>>
>> for i, x in enumerate(l):
>># do some stuff, sometimes assign l[i]
>>
>> for k, v in d.items():
>># do some stuff, sometimes assign d[k]
>
> for a, b in
Op 31-03-16 om 04:40 schreef Steven D'Aprano:
> On Thu, 31 Mar 2016 06:07 am, Antoon Pardon wrote:
>
>>> Because fundamentally, it doesn't matter whether dicts are surjections or
>>> not. They're still many-to-one mappings, and those mappings between keys
>>> and values should not change due to the
On Thursday 31 March 2016 13:45, Paul Rubin wrote:
> Steven D'Aprano writes:
>> I want to see an actual application where adding a new key to a
.^
>> mapping is expected to change the other keys.
> directory["mary.roommate"] = "bob"
> directory["mary.address"
Steven D'Aprano writes:
> I want to see an actual application where adding a new key to a
> mapping is expected to change the other keys.
directory["mary.roommate"] = "bob"
directory["mary.address"] = None # unknown address
...
directory["bob.address"] = "132 Elm Street"
Since Bob and Mary are
1 - 100 of 843 matches
Mail list logo