[Python-ideas] PEP 428: poll about the joining syntax
phd at phdru.name
Tue Oct 9 01:11:38 CEST 2012
On Tue, Oct 09, 2012 at 01:02:05AM +0200, "T.B." <bauertomer at gmail.com> wrote:
> Regarding '/', I would like to mention Scapy , the packet
> manipulation program. From its documentation: "The / operator has
> been used as a composition operator between two layers". The '/'
> feels natural to use with Scapy. An example from the docs:
> >Let?s say I want a broadcast MAC address, and IP payload to ketchup.com and to mayo.com, TTL value from 1 to 9, and an UDP payload:
> >>>> Ether(dst="ff:ff:ff:ff:ff:ff")/IP(dst=["ketchup.com","mayo.com"],ttl=(1,9))/UDP()
Except that layers are divided (pun intended) in wrong order. It
seems that Ether is at the top where the traditional stack order from
Ether to UDP is from bottom to top.
Oleg Broytman http://phdru.name/ phd at phdru.name
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-ideas