On Mon, Jul 2, 2012 at 5:49 AM, Sturla Molden wrote:
> On 30.06.2012 01:06, Stefan Behnel wrote:
>
>>> std::string<=> bytes
>>> std::map<=> dict
>>> iterable => std::vector => list
>>> iterable => std::list => list
>>> iterable => std::set => set
>>> 2-iterable => std::pair => 2-tuple
>>
On 02.07.2012 14:49, Sturla Molden wrote:
I think (in C++11) std::unordered_set and std::unordered_map should be
used instead. They are hash-based with O(1) lookup.
std::set and std::map are binary search threes with average O(log n)
lookup and worst-case O(n**2).
Sorry typo, that should be w
On 30.06.2012 01:06, Stefan Behnel wrote:
std::string<=> bytes
std::map<=> dict
iterable => std::vector => list
iterable => std::list => list
iterable => std::set => set
2-iterable => std::pair => 2-tuple
Very cool.
I think (in C++11) std::unordered_set and std::unordered_map shoul
On Fri, Jun 29, 2012 at 4:06 PM, Stefan Behnel wrote:
> Robert Bradshaw, 30.06.2012 00:38:
>> I implemented
>>
>> std::string <=> bytes
>> std::map <=> dict
>> iterable => std::vector => list
>> iterable => std::list => list
>> iterable => std::set => set
>> 2-iterable => std::pair => 2-tuple
>
>
Robert Bradshaw, 30.06.2012 00:38:
> I implemented
>
> std::string <=> bytes
> std::map <=> dict
> iterable => std::vector => list
> iterable => std::list => list
> iterable => std::set => set
> 2-iterable => std::pair => 2-tuple
Very cool.
>> What about allowing list() etc.? As long as the ite
On Thu, Jun 28, 2012 at 5:10 AM, Stefan Behnel wrote:
> Robert Bradshaw, 28.06.2012 12:07:
>> On Thu, Jun 28, 2012 at 2:54 AM, Stefan Behnel wrote:
>>> Robert Bradshaw, 28.06.2012 10:59:
I've been looking how painful it is to constantly convert between
Python objects and string in C++.
>
Robert Bradshaw, 28.06.2012 12:07:
> On Thu, Jun 28, 2012 at 2:54 AM, Stefan Behnel wrote:
>> Robert Bradshaw, 28.06.2012 10:59:
>>> I've been looking how painful it is to constantly convert between
>>> Python objects and string in C++.
>>
>> You mean std::string (as I think it's called)? Can't we
On Thu, Jun 28, 2012 at 2:54 AM, Stefan Behnel wrote:
> Robert Bradshaw, 28.06.2012 10:59:
>> I've been looking how painful it is to constantly convert between
>> Python objects and string in C++.
>
> You mean std::string (as I think it's called)? Can't we just special case
> that in the same way
Robert Bradshaw, 28.06.2012 10:59:
> I've been looking how painful it is to constantly convert between
> Python objects and string in C++.
You mean std::string (as I think it's called)? Can't we just special case
that in the same way that we special case char* and friends? Basically just
one type
I've been looking how painful it is to constantly convert between
Python objects and string in C++. Yes, it's easy to write a utility,
but this should be as natural (if not more so, as the length is
explicit) than bytes <-> char*. Several other of the libcpp classes
(vector, map) have natural Pytho
10 matches
Mail list logo