Jonathan Lange wrote:
> On Fri, Oct 23, 2009 at 7:22 PM, Muharem Hrnjadovic
> <email address hidden> wrote:
>> Hmm .. interesting. IMHO the `ISeriesSourcePackageBranch` class has
>> nothing to it that would preclude it from external exposure. Why is it
>> banned from all APIs?
>>
>
> Because it's a boring implementation detail of no actual use. It's
> sole purpose is to allow us to associate a mapping from pocket ->
> branch with each source package.
It's akin to a "linking table" in the SQL/schema modelling world and,
as such, can be very useful even to "external" users.
> If we weren't using an ORM, it wouldn't be a class at all.
>
>> The ISourcePackage.linked_branches() method returns a collection of
>>
>> (SeriesSourcePackageBranch.pocket, Branch) tuples
>>
>> which makes it difficult to declare its return type using something like
>> @operation_returns_collection_of(). Or am I missing something?
>>
>
> TBH, I'm not sure why it's a list of tuples rather than a dict. I
> don't know how to expose a dict over the API. Surely someone has done
> it before though.
That's a nice idea, construct a dict from the list of 2-tuples and
expose that in the API.
Jonathan Lange wrote: ackageBranch` class has
> On Fri, Oct 23, 2009 at 7:22 PM, Muharem Hrnjadovic
> <email address hidden> wrote:
>> Hmm .. interesting. IMHO the `ISeriesSourceP
>> nothing to it that would preclude it from external exposure. Why is it
>> banned from all APIs?
>>
>
> Because it's a boring implementation detail of no actual use. It's
> sole purpose is to allow us to associate a mapping from pocket ->
> branch with each source package.
It's akin to a "linking table" in the SQL/schema modelling world and,
as such, can be very useful even to "external" users.
> If we weren't using an ORM, it wouldn't be a class at all. linked_ branches( ) method returns a collection of ckageBranch. pocket, Branch) tuples returns_ collection_ of(). Or am I missing something?
>
>> The ISourcePackage.
>>
>> (SeriesSourcePa
>>
>> which makes it difficult to declare its return type using something like
>> @operation_
>>
>
> TBH, I'm not sure why it's a list of tuples rather than a dict. I
> don't know how to expose a dict over the API. Surely someone has done
> it before though.
That's a nice idea, construct a dict from the list of 2-tuples and
expose that in the API.
Best regards
--
Muharem Hrnjadovic <email address hidden>
Public key id : B2BBFCFC
Key fingerprint : A5A3 CC67 2B87 D641 103F 5602 219F 6B60 B2BB FCFC