[p4python] P4.Map differences

Sven Erik Knop sknop at perforce.com
Fri Nov 25 08:50:37 PST 2011


Hi Vincent,


thank you for bringing this to our attention. This bug has been fixed in 
2011.1 now available on the Perforce website. From the release notes:

	#326428 (Bug #46255) *
	    P4.Map.reverse would return a P4API.P4Map object. It now
	    returns an instance of P4.Map instead.

Kind regards,

Sven Erik


On 22/11/2011 17:17, Vincent Batts wrote:
> Hello all,
>
> I've found an inconsistency in P4 API (2010.1.260003) for Map, for
> python (2010.1). I have checked the p4ruby library, and it does not
> exist there. To see/reproduce the bug, run:
> <paste>
>>>> import P4
>>>>
>>>> cm = P4.Map()
>>>> cm1 = cm.reverse()
>>>>
>>>> hasattr(cm, "includes")
> True
>>>> hasattr(cm1, "includes")
> False
>>>> type(cm)
> <class 'P4.Map'>
>>>> type(cm1)
> <type 'P4API.P4Map'>
> </paste>
>
> For now, the workaround is:
> cm1 = P4.Map(cm.reverse().as_array())
>
> Take care,
> vb
> http://hashbangbash.com/
> _______________________________________________
> p4python mailing list
> p4python at perforce.com
> http://maillist.perforce.com/mailman/listinfo/p4python



More information about the p4python mailing list