Lines Matching refs:policy
38 policy=None):
44 Optional mangle_from_ is a flag that, when True (the default if policy
55 The policy keyword specifies a policy object that controls a number of
56 aspects of the generator's operation. If no policy is specified,
57 the policy associated with the Message object passed to the
63 mangle_from_ = True if policy is None else policy.mangle_from_
67 self.policy = policy
85 the output. The default value is determined by the policy specified
87 from the policy associated with the msg.
94 policy = msg.policy if self.policy is None else self.policy
96 policy = policy.clone(linesep=linesep)
98 policy = policy.clone(max_line_length=self.maxheaderlen)
99 self._NL = policy.linesep
104 # subparts, and because clone uses the computed policy (not None),
105 # submessages will automatically get set to the computed policy when
107 old_gen_policy = self.policy
108 old_msg_policy = msg.policy
110 self.policy = policy
111 msg.policy = policy
119 self.policy = old_gen_policy
120 msg.policy = old_msg_policy
126 None, # Use policy setting, which we've adjusted
127 policy=self.policy)
227 self.write(self.policy.fold(h, v))
321 p = self.policy
322 self.policy = p.clone(max_line_length=0)
326 self.policy = p
403 bytes, these are decoded back to bytes for output. If the policy has
424 self._fp.write(self.policy.fold_binary(h, v))
433 if _has_surrogates(msg._payload) and not self.policy.cte_type=='7bit':
459 policy=None):
482 policy=policy)