params.py (5037:f7af52292c45) | params.py (5219:e93a04703f56) |
---|---|
1# Copyright (c) 2004-2006 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 443 unchanged lines hidden (view full) --- 452 453 elif len(args) == 1: 454 if kwargs: 455 self.first = self.type(args[0]) 456 handle_kwargs(self, kwargs) 457 elif isinstance(args[0], Range): 458 self.first = self.type(args[0].first) 459 self.second = self.type(args[0].second) | 1# Copyright (c) 2004-2006 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 443 unchanged lines hidden (view full) --- 452 453 elif len(args) == 1: 454 if kwargs: 455 self.first = self.type(args[0]) 456 handle_kwargs(self, kwargs) 457 elif isinstance(args[0], Range): 458 self.first = self.type(args[0].first) 459 self.second = self.type(args[0].second) |
460 elif isinstance(args[0], (list, tuple)): 461 self.first = self.type(args[0][0]) 462 self.second = self.type(args[0][1]) |
|
460 else: 461 self.first = self.type(0) 462 self.second = self.type(args[0]) - 1 463 464 elif len(args) == 2: 465 self.first = self.type(args[0]) 466 self.second = self.type(args[1]) 467 else: --- 701 unchanged lines hidden --- | 463 else: 464 self.first = self.type(0) 465 self.second = self.type(args[0]) - 1 466 467 elif len(args) == 2: 468 self.first = self.type(args[0]) 469 self.second = self.type(args[1]) 470 else: --- 701 unchanged lines hidden --- |