
57 Cal.2d 335 (1962)
WILLIAM H. BRAILSFORD, Petitioner,
v.
JACK BLUE, as County Clerk, etc., Respondent.
Supreme Court of California. 
Feb. 19, 1962.
 Wagener, Jewett, Lynch & Curran and Donald W. Curran for Petitioner.
 J. F. Coakley, District Attorney, R. Robert Hunter, Chief Assistant District Attorney, and Frank D. Parker, Assistant District Attorney, for Respondent. *336
 McCOMB, J.
 Petitioner asks this court for a writ of mandate to restrain Jack Blue, as County Clerk of the County of Alameda, State of California, (hereinafter referred to as "respondent") from making any reference to Judicial Office No. 2 of the Municipal Court for the Oakland-Piedmont Judicial District in the County of Alameda, State of California, (an office now held by petitioner) on the ballot to be prepared and printed for use by the electors at the primary and general elections in 1962.
 Facts
 (1) Edward J. Smith was a duly elected, qualified and acting Judge of the Municipal Court for the Oakland-Piedmont Judicial District in Alameda County for a term of office expiring on January 7, 1963. For the purposes of the elections to be held in 1962, this office has been designated as Judicial Office No. 2.
 (2) Judge Smith died on September 21, 1961.
 (3) On October 2, 1961, petitioner was appointed by the Governor of this state to fill the vacancy caused by the death of Judge Smith.
 (4) Petitioner took the oath of office on October 27, 1961, and is now, and ever since has been, performing the duties of such office.
 (5) Less than 10 months exist between the date of the occurrence of the vacancy above mentioned and the forthcoming primary election to be held on June 5, 1962.
 (6) Respondent is charged with the duty of conducting the election of judges in said judicial district, and it is alleged in the petition that he intends to, and unless otherwise ordered by this court will, include Judicial Office No. 2 of the Municipal Court for the Oakland-Piedmont Judicial District in Alameda County, now occupied by petitioner, on the ballot in the primary election of June 5, 1962, and, if necessary, on the ballot in the general election of November 6, 1962.
 [1] This is the sole question presented: In view of the provisions of the last sentence of section 71180 of the Government Code, should Judicial Office No. 2 of the Municipal Court for the Oakland-Piedmont Judicial District in Alameda County be placed on the ballot at the primary election to be held on June 5, 1962?  [fn. 1]*337
 No. The municipal courts of California, as presently constituted, were created by amendment of section 11 of article VI of the Constitution, approved November 7, 1950. This amendment expressly validated, and made fully and completely effective, the Municipal and Justice Court Act of 1949. (Stats. 1949, ch. 1510, p. 2681.)
 Section 9 of said Municipal and Justice Court Act consisted of a single paragraph containing two sentences, as follows: "Any vacancy in the office of judge of a municipal court shall be filled by appointment by the Governor and any vacancy in the office of judge of a justice court shall be filled by appointment by the board of supervisors of the county in which the justice court is situated, but no vacancy shall be deemed to exist in any such office before the time fixed in Sections 2 and 3 of this act for the selection of the judges of said court and the time fixed by law for their qualification. Any person so appointed shall hold office for the remainder of the unexpired term of his predecessor and until his successor is elected and qualifies, except that if the office to which any person so appointed was not previously occupied, he shall hold office until his successor is elected at the general state election next succeeding the occurrence of said vacancy and qualifies; provided, however, that no successor to a person appointed to fill a vacancy shall be elected at any election held within ten months of the date of the occurrence of said vacancy." (Italics added.)
 Section 9 of the Municipal and Justice Court Act was subsequently codified as section 71180 of the Government Code. (Stats. 1953, ch. 206, p. 1278.) In the codification the first sentence was left unchanged, except that reference to sections 2 and 3 of the Municipal and Justice Court Act was changed to the appropriate Government Code sections. The last sentence of the section was made into three sentences, as follows: "The appointee shall hold office for the remainder of the unexpired term of his predecessor and until his successor is elected and qualifies. If the office to which any person so appointed was not previously occupied, he shall hold office until his successor is elected at the general state election next succeeding the occurrence of the vacancy and qualifies. No successor to such appointee shall be elected at any election *338 held within 10 months of the date of the occurrence of the vacancy."
 Section 71180 was amended in 1959 to delete therefrom any references to judges of justice courts. The only other change made was to put the last two sentences in a separate paragraph. No amendments have been made since 1959.
 The term of office and the time for election of judges of the municipal court are provided for in sections 71141 and 71145 of the Government Code.  [fn. 2]
 In Donnellan v. Hite, 139 Cal.App.2d 43, 46 et seq. [293 P.2d 158], the court considered section 71180 of the Government Code as it affected the election of a successor to the person initially appointed to a newly created municipal court judgeship, and held that the 10-month period during which no successor could be elected was to be computed from the date of the vacancy to the date of the primary election.
 Section 9 of the Municipal and Justice Court Act, hereinabove quoted, provided that no successor to an appointee to any vacancy in the office of judge of a municipal court could be elected at any election held within 10 months of the date of the occurrence of the vacancy.
 In the large majority of cases judicial offices are filled at the primary election. Under the provisions of section 2 3/4 of article II of the Constitution, a candidate for a judicial or other nonpartisan office who secures a majority of the votes cast for that office at the primary election is elected. Accordingly, it has been held that where such a candidate receives a majority of the votes cast for the office at the primary election, the elective processes have spent their force. (French v. Jordan, 28 Cal.2d 765, 770 [172 P.2d 46].) Under such circumstances, the primary election is in legal effect a general election. (Immel v. Langley, 52 Cal.2d 104, 106 [1] [338 P.2d 385].) It would therefore be unreasonable to suppose that the Legislature did not intend to include a primary election in the term "any election." *339
 Section 9 of the Municipal and Justice Court Act, then, must be taken to mean that no successor to the Governor's appointee to fill any vacancy in the office of judge of a municipal court could be elected prior to the holding of a primary election more than 10 months from the inception of the vacancy.
 [2] Section 2 of the Government Code provides, in substance, that no change in the law is intended by codification. As a result, the last three sentences of section 71180, as codified in 1953, must be given the same meaning as is found in the last sentence of section 9 of the Municipal and Justice Court Act.
 [3] Parts of an amended statute not affected by the amendment will be given the same construction that they received before the amendment. (Barber v. Palo Verde etc. Co., 198 Cal. 649, 651 [2] [246 P. 1044].) Therefore, since the only change intended by the 1959 amendment to section 71180 of the Government Code was to delete therefrom any reference to judges of justice courts, the portion of section 71180 prohibiting any election within 10 months after the inception of the vacancy is controlling here.
 The demurrer is overruled, and it is directed that a writ of mandate be issued forthwith in accordance with petitioner's prayer.
 Gibson, C. J., Traynor, J., Schauer, J., Peters, J., White, J., and Dooling, J., concurred.
 Section 71145 of the Government Code reads: "The term of office of judges of municipal and justice courts is six years from and including the first Monday of January after the January 1st next succeeding their election. Judges shall hold office until their successors are elected and qualify, but the office shall be deemed to be vacant upon the expiration of the fixed term for the purpose of selecting a successor."
NOTES
[fn. 1]  1. The parties have stipulated that (a) issuance by this court of an order to show cause is waived; (b) oral argument is waived, and the matter may be submitted on the verified petition of petitioner and the demurrer thereto filed by respondent and the points and authorities submitted by the respective parties; and (c) whatever order is issued by this court shall be final forthwith.
[fn. 2]  2. Section 71141 of the Government Code reads: "Except as provided in Sections 71142 and 71146, judges of the municipal court and justice court shall be elected at the general state election next preceding the expiration of the term for which the incumbent has been elected."
